]> granicus.if.org Git - vim/commitdiff
patch 8.2.0364: printf test failing on Haiku v8.2.0364
authorBram Moolenaar <Bram@vim.org>
Sun, 8 Mar 2020 17:41:09 +0000 (18:41 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 8 Mar 2020 17:41:09 +0000 (18:41 +0100)
Problem:    Printf test failing on Haiku.
Solution:   Make a difference between int and short. (Dominique Pelle,
            closes #5749)

src/message.c
src/version.c

index cb1a773ce7602d801cf0e56e22a2461aebfc6916..0119145cf4a27ee851445486b5e8ec923fd33a26 100644 (file)
@@ -4722,9 +4722,13 @@ vim_vsnprintf_typval(
                            // signed
                            switch (length_modifier)
                            {
-                           case '\0':
+                           case '\0': str_arg_l += sprintf(
+                                                tmp + str_arg_l, f,
+                                                int_arg);
+                                      break;
                            case 'h': str_arg_l += sprintf(
-                                                tmp + str_arg_l, f, int_arg);
+                                                tmp + str_arg_l, f,
+                                                (short)int_arg);
                                      break;
                            case 'l': str_arg_l += sprintf(
                                                tmp + str_arg_l, f, long_arg);
@@ -4739,9 +4743,13 @@ vim_vsnprintf_typval(
                            // unsigned
                            switch (length_modifier)
                            {
-                           case '\0':
+                           case '\0': str_arg_l += sprintf(
+                                               tmp + str_arg_l, f,
+                                               uint_arg);
+                                      break;
                            case 'h': str_arg_l += sprintf(
-                                               tmp + str_arg_l, f, uint_arg);
+                                               tmp + str_arg_l, f,
+                                               (unsigned short)uint_arg);
                                      break;
                            case 'l': str_arg_l += sprintf(
                                               tmp + str_arg_l, f, ulong_arg);
index 60deed84ae86404acab1339000337baa73209bb6..d88f5ec1157133801d144c817b549f9d01a5a9a7 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    364,
 /**/
     363,
 /**/