Hi,

The printf() function on Vim script doesn't support 64-bit Numbers.
E.g.:

  :echo 100000000000000
  100000000000000
  :echo printf('%d', 100000000000000)
  276447232

Attached patch fixes the problem.

Regards,
Ken Takata

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent  b366794c67551cd403263586cbcc929a74a62b32

diff --git a/src/message.c b/src/message.c
--- a/src/message.c
+++ b/src/message.c
@@ -4205,6 +4205,17 @@ vim_vsnprintf(
 		default: break;
 	    }
 
+# if defined(FEAT_EVAL) && defined(FEAT_NUM64)
+	    switch (fmt_spec)
+	    {
+	    case 'd': case 'u': case 'o': case 'x': case 'X':
+		if (tvs != NULL && length_modifier == '\0')
+		    length_modifier = 'L';
+	    default:
+		break;
+	    }
+# endif
+
 	    /* get parameter value, do initial processing */
 	    switch (fmt_spec)
 	    {

Raspunde prin e-mail lui