From 8c33dfab39c380ab5162b712bbab024fecb61cf8 Mon Sep 17 00:00:00 2001 From: Murphy Berzish Date: Sun, 27 Nov 2016 20:51:34 -0500 Subject: [PATCH] fix escape character overflow print --- src/ast/ast_smt2_pp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ast/ast_smt2_pp.cpp b/src/ast/ast_smt2_pp.cpp index ed634069c..db2043320 100644 --- a/src/ast/ast_smt2_pp.cpp +++ b/src/ast/ast_smt2_pp.cpp @@ -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;