about summary refs log tree commit diff stats
path: root/060string.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-06-02 00:48:32 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-06-02 00:48:32 -0700
commit12c3ee1e4576f13808e962b2f818fb5d61466e9d (patch)
tree09d69f7a6a346ad961ad49ff6dd8990bd7a7e24d /060string.mu
parent67eeacbff185da5ba4cec507cb22e50cc78057c7 (diff)
downloadmu-12c3ee1e4576f13808e962b2f818fb5d61466e9d.tar.gz
1520 - repl kinda working
But we really should test the top-level integration with
'run-interactive'.
Diffstat (limited to '060string.mu')
-rw-r--r--060string.mu10
1 files changed, 5 insertions, 5 deletions
diff --git a/060string.mu b/060string.mu
index 47a05c5a..0e7d0da5 100644
--- a/060string.mu
+++ b/060string.mu
@@ -291,15 +291,15 @@ recipe integer-to-decimal-string [
 recipe buffer-to-array [
   default-space:address:array:character <- new location:type, 30:literal
   in:address:buffer <- next-ingredient
-  len:number <- get in:address:buffer/deref, length:offset
-#?   $print [size ], len:number, [ 
-#? ] #? 1
-  s:address:array:character <- get in:address:buffer/deref, data:offset
   {
     # propagate null buffer
-    break-if s:address:array:character
+    break-if in:address:buffer
     reply 0:literal
   }
+  len:number <- get in:address:buffer/deref, length:offset
+#?   $print [size ], len:number, [ 
+#? ] #? 1
+  s:address:array:character <- get in:address:buffer/deref, data:offset
   # we can't just return s because it is usually the wrong length
   result:address:array:character <- new character:type, len:number
   i:number <- copy 0:literal
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300