patch 8.2.0296: mixing up "long long" and __int64 may cause problems
Problem: Mixing up "long long" and __int64 may cause problems. (John
Marriott)
Solution: Pass varnumber_T to vim_snprintf(). Add v:numbersize.
diff --git a/src/message.c b/src/message.c
index 9ab0eae..c2855fb 100644
--- a/src/message.c
+++ b/src/message.c
@@ -4129,7 +4129,7 @@
* Limited support for floating point was added: 'f', 'F', 'e', 'E', 'g', 'G'.
*
* Length modifiers 'h' (short int) and 'l' (long int) and 'll' (long long int)
- * are supported.
+ * are supported. NOTE: for 'll' the argument is varnumber_T or uvarnumber_T.
*
* The locale is not used, the string is used as a byte string. This is only
* relevant for double-byte encodings where the second byte may be '%'.
@@ -4371,7 +4371,7 @@
p++;
if (length_modifier == 'l' && *p == 'l')
{
- // double l = long long
+ // double l = __int64 / varnumber_T
length_modifier = 'L';
p++;
}
@@ -4501,20 +4501,20 @@
// argument is never negative)
int arg_sign = 0;
- // only defined for length modifier h, or for no
- // length modifiers
+ // only set for length modifier h, or for no length
+ // modifiers
int int_arg = 0;
unsigned int uint_arg = 0;
- // only defined for length modifier l
+ // only set for length modifier l
long int long_arg = 0;
unsigned long int ulong_arg = 0;
- // only defined for length modifier ll
+ // only set for length modifier ll
varnumber_T llong_arg = 0;
uvarnumber_T ullong_arg = 0;
- // only defined for b conversion
+ // only set for b conversion
uvarnumber_T bin_arg = 0;
// pointer argument value -only defined for p