diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-01-01 14:51:29 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-01-01 14:51:29 +0100 |
commit | a78b79b9e64900de9bb2dc42e0a64b0207d7ba49 (patch) | |
tree | d83f86d43ab539bfe8448c65b0d1e9611ac0bb69 | |
parent | 6bfb6e15a1be825fa76713f76a04e71058dadd6f (diff) | |
download | uwu-nolambda-a78b79b9e64900de9bb2dc42e0a64b0207d7ba49.tar.xz |
Fix crash on interrupt signal while prompting in io:scan
-rw-r--r-- | io.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -32,6 +32,10 @@ UwUVMValue uwu_scan(UwUVMArgs *args) error("error: nolambda:io:scan requires exactly one or zero arguments\n"); char *return_string = linenoise(prompt); + + if (! return_string) + return_string = strdup(""); + UwUVMValue return_value = uwustr_create(return_string); linenoiseFree(return_string); |