Fix a long vs. int format string bug in xdprsym()

Could print junk on machines where long is wider than int, but only in
oops recovery.
This commit is contained in:
Markus Armbruster 2008-08-02 12:04:06 -04:00
parent 1d9aac2cf9
commit 24aaec7e34

View file

@ -183,7 +183,7 @@ xdprsym(struct xdstr *xd, int key, int type, char *sep)
char *sym = symbol_by_value(key, ef_ptr(type, 0)); char *sym = symbol_by_value(key, ef_ptr(type, 0));
if (CANT_HAPPEN(!sym)) if (CANT_HAPPEN(!sym))
xd->pr("%s%ld", sep, key); xd->pr("%s%d", sep, key);
else { else {
xd->pr("%s", sep); xd->pr("%s", sep);
xdpresc(xd, sym, INT_MAX); xdpresc(xd, sym, INT_MAX);