diff options
Diffstat (limited to 'src/pkg')
| -rw-r--r-- | src/pkg/runtime/mgc0.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pkg/runtime/mgc0.c b/src/pkg/runtime/mgc0.c index 0bb2badde5..65e51e4d1f 100644 --- a/src/pkg/runtime/mgc0.c +++ b/src/pkg/runtime/mgc0.c @@ -778,6 +778,7 @@ scanblock(Workbuf *wbuf, bool keepworking) void *obj; Type *t; Slice *sliceptr; + String *stringptr; Frame *stack_ptr, stack_top, stack[GC_STACK_CAPACITY+4]; BufferList *scanbuffers; Scanbuf sbuf; @@ -948,8 +949,11 @@ scanblock(Workbuf *wbuf, bool keepworking) break; case GC_STRING: - obj = *(void**)(stack_top.b + pc[1]); - markonly(obj); + stringptr = (String*)(stack_top.b + pc[1]); + if(stringptr->len != 0) { + obj = stringptr->str; + markonly(obj); + } pc += 2; continue; |
