about summary refs log tree commit diff
path: root/stdio-common/tstscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/tstscanf.c')
-rw-r--r--stdio-common/tstscanf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/stdio-common/tstscanf.c b/stdio-common/tstscanf.c
index 277d4e1cbf..eb2f30d0f9 100644
--- a/stdio-common/tstscanf.c
+++ b/stdio-common/tstscanf.c
@@ -160,6 +160,12 @@ main (int argc, char **argv)
 
     if (res != 2 || a != 123 || b != 456 || n != 6)
       return 1;
+
+    res = sscanf ("0", "%lg", &a);
+    printf ("res = %d, a = %g\n", res, a);
+
+    if (res != 1 || a != 0)
+      exit (EXIT_FAILURE);
   }
 
   exit(EXIT_SUCCESS);