diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-08-29 13:24:09 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-08-29 13:24:09 -0700 |
| commit | fe58f1db1feface0f4c369355ec8b351810b873f (patch) | |
| tree | e0f053e63aedb3948915d71e2f882f26d7234e08 | |
| parent | d8b1020847a214f73e1f5109a50e593a3e623daa (diff) | |
oops. read-to-buffer was tightly bound to that specific magic word. fixed.
it had a baked-in assumption that the word was exactly eight bytes long, expressed in how it added the null terminator for stringcmp's benefit. Force-Push: yes Change-Id: I2a4f9967a3f564e16f163a22b70030a4bf938b5e
| -rw-r--r-- | transform.e | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/transform.e b/transform.e index e7a8506..20e7a36 100644 --- a/transform.e +++ b/transform.e @@ -213,19 +213,19 @@ ~ Make sure to pack the zero to serve as a null terminator. pack8 drop drop swap drop swap drop exit } if + + ~ If it's a space character, we need to check if we just consumed the + ~ magic word, and do some handling to reset the word tracking. dup is-space { ~ (buffer size, buffer address, word start, output point, key) ~ Tuck the key out of the way until we've done some stuff. 3unroll - ~ If it's a space character, first check if we just consumed the magic - ~ word... - 2dup swap - 8 = dup { - drop - ~ Add a null terminator so we can use stringcmp - dup 0 swap ! - ~ Check for the magic word - over 6 pick stringcmp 0 = - } if + + ~ Add a null terminator so we can use stringcmp + dup 0 swap 8! + + ~ Check for the magic word. + over 6 pick stringcmp 0 = { ~ It's magic, so exit. ~ Make sure to pack a zero to serve as a null terminator. 0 pack8 |