changeset 287:e214637b0645

Add check for (currently unsupported) length modifiers.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 22 Feb 2016 13:51:14 +0200
parents 5cbdf215e42b
children 89c7696acb82
files th_string.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/th_string.c	Mon Feb 22 13:50:44 2016 +0200
+++ b/th_string.c	Mon Feb 22 13:51:14 2016 +0200
@@ -293,6 +293,17 @@
                 while (th_isdigit(*fmt))
                     f_prec = f_prec * 10 + (*fmt++ - '0');
             }
+            // Check for length modifiers (NOT SUPPORTED CURRENTLY)
+            switch (*fmt)
+            {
+                case 'l':
+                case 'L':
+                case 'h':
+                case 'j':
+                case 'z':
+                case 't':
+                    return -202;
+            }
 
             switch (*fmt)
             {