diff options
Diffstat (limited to 'libgfortran/runtime')
-rw-r--r-- | libgfortran/runtime/stop.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libgfortran/runtime/stop.c b/libgfortran/runtime/stop.c index 87c0411..f2a1233 100644 --- a/libgfortran/runtime/stop.c +++ b/libgfortran/runtime/stop.c @@ -44,11 +44,13 @@ stop_numeric (GFC_INTEGER_4 code) void stop_string (const char *string, GFC_INTEGER_4 len) { - st_printf ("STOP "); - while (len--) - st_printf ("%c", *(string++)); - st_printf ("\n"); - + if (string) + { + st_printf ("STOP "); + while (len--) + st_printf ("%c", *(string++)); + st_printf ("\n"); + } sys_exit (0); } |