~ chicken-core (chicken-5) fc7c5c8ba0063edeb7dee4e5dcba7a8dc3851a22


commit fc7c5c8ba0063edeb7dee4e5dcba7a8dc3851a22
Author:     Evan Hanson <evhan@foldling.org>
AuthorDate: Wed Mar 1 23:05:11 2017 +1300
Commit:     Peter Bex <peter@more-magic.net>
CommitDate: Sat Mar 4 16:27:42 2017 +0100

    Fix procedure name in errors on bad string arguments to `system`
    
    When `system` is called with a string containing null bytes, the
    resulting error should use "system" as its location, not
    "get-environment-variables".
    
    Signed-off-by: Peter Bex <peter@more-magic.net>

diff --git a/runtime.c b/runtime.c
index a3298810..e996559d 100644
--- a/runtime.c
+++ b/runtime.c
@@ -4796,7 +4796,7 @@ C_regparm C_word C_fcall C_execute_shell_command(C_word string)
   C_memcpy(buf, C_data_pointer(string), n);
   buf[ n ] = '\0';
   if (n != strlen(buf))
-    barf(C_ASCIIZ_REPRESENTATION_ERROR, "get-environment-variable", string);
+    barf(C_ASCIIZ_REPRESENTATION_ERROR, "system", string);
 
   n = C_system(buf);
 
Trap