3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

fix escape character overflow print

This commit is contained in:
Murphy Berzish 2016-11-27 20:51:34 -05:00
parent 1fa8129c8f
commit 8c33dfab39

View file

@ -343,7 +343,7 @@ format * smt2_pp_environment::pp_str_literal(app * t) {
} else {
// general hex escape
buf << "\\x";
unsigned int cVal = (unsigned int)c;
unsigned int cVal = ((unsigned int)c) & 0x000000FF;
const char convtable[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
unsigned int highPart = cVal / 16;
unsigned int lowPart = cVal % 16;