changeset 371:bc5567f5e305

Check %p for ll and L modifiers and error out on them.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 29 Feb 2016 13:49:12 +0200
parents f6b9991d76ed
children 3d32a0c72dc7
files th_string.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/th_string.c	Mon Feb 29 13:46:01 2016 +0200
+++ b/th_string.c	Mon Feb 29 13:49:12 2016 +0200
@@ -421,6 +421,9 @@
                     break;
 
                 case 'p':
+                    if (f_flags & (TH_PF_LONG | TH_PF_LONGLONG))
+                        return -120;
+
 #if (TH_PTRSIZE == 32)
                     f_flags |= TH_PF_LONG;
 #elif (TH_PTRSIZE == 64)