1
1
mirror of https://github.com/kanaka/mal.git synced 2024-11-10 12:47:45 +03:00

forth: Fix critical string-resizing bug

This commit is contained in:
Chouser 2015-02-16 02:01:56 -05:00
parent d44f31c221
commit cd21ff0d3c

View File

@ -28,7 +28,7 @@ require types.fs
: str-append { buf-addr buf-str-len str-addr str-len }
buf-str-len str-len +
{ new-len }
new-len str-base-size > if
new-len str-base-size >= if
buf-str-len new-len xor buf-str-len > if
buf-addr new-len round-up resize throw
to buf-addr