Mercurial > repos > tabletprog
comparison modules/string.tp @ 305:14b4e540af28
Properly null terminate result of from:withLength
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 26 Jul 2014 15:02:01 -0700 |
parents | 5d24b3117aa7 |
children | 8dbb2d2522a5 |
comparison
equal
deleted
inserted
replaced
304:dcb495cf2b97 | 305:14b4e540af28 |
---|---|
217 ret <- make_object: (addr_of: string_meta) NULL 0 | 217 ret <- make_object: (addr_of: string_meta) NULL 0 |
218 ret data!: (GC_MALLOC_ATOMIC: clampedLen + 1) | 218 ret data!: (GC_MALLOC_ATOMIC: clampedLen + 1) |
219 memcpy: (ret data) data + start clampedLen | 219 memcpy: (ret data) data + start clampedLen |
220 ret len!: clampedLen | 220 ret len!: clampedLen |
221 ret bytes!: clampedLen | 221 ret bytes!: clampedLen |
222 (ret data) set: clampedLen 0 | |
222 ret | 223 ret |
223 } | 224 } |
224 | 225 |
225 from <- :start { | 226 from <- :start { |
226 from: start withLength: length | 227 from: start withLength: length |