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

chasing bug in the Java bindings

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-12-03 16:58:44 -08:00
parent 0ec6e2f218
commit 54e452a1af
3 changed files with 54 additions and 12 deletions

View file

@ -232,8 +232,11 @@ struct z3_replayer::imp {
}
void read_ptr() {
if (!(('0' <= curr() && curr() <= '9') || ('A' <= curr() && curr() <= 'F') || ('a' <= curr() && curr() <= 'f')))
if (!(('0' <= curr() && curr() <= '9') || ('A' <= curr() && curr() <= 'F') || ('a' <= curr() && curr() <= 'f'))) {
TRACE("invalid_ptr", tout << "curr: " << curr() << "\n";);
throw z3_replayer_exception("invalid ptr");
}
unsigned pos = 0;
m_ptr = 0;
while (true) {
char c = curr();
@ -246,10 +249,13 @@ struct z3_replayer::imp {
else if ('A' <= c && c <= 'F') {
m_ptr = m_ptr * 16 + 10 + (c - 'A');
}
else if (pos == 1 && (c == 'x' || c == 'X')) {
// support for 0x.... notation
}
else {
return;
}
next();
next(); pos++;
}
}