Commit bafd1787 authored by Russ Cox's avatar Russ Cox

fix traceback prints - %S was not advancing pointer enough

R=r
DELTA=6  (5 added, 1 deleted, 0 changed)
OCL=27500
CL=27525
parent cff99ba1
...@@ -58,11 +58,15 @@ printf(int8 *s, ...) ...@@ -58,11 +58,15 @@ printf(int8 *s, ...)
break; break;
case 'p': // pointer-sized case 'p': // pointer-sized
case 's': case 's':
case 'S':
if(sizeof(uintptr) == 8 && ((uint32)(uint64)arg)&4) if(sizeof(uintptr) == 8 && ((uint32)(uint64)arg)&4)
arg += 4; arg += 4;
narg = arg + sizeof(uintptr); narg = arg + sizeof(uintptr);
break; break;
case 'S': // pointer-aligned but bigger
if(sizeof(uintptr) == 8 && ((uint32)(uint64)arg)&4)
arg += 4;
narg = arg + sizeof(String);
break;
} }
switch(*p) { switch(*p) {
case 'd': case 'd':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment