This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository openjk.

commit 8ea096c529c525db3bd2babe3c1a9cc0e230e58d
Author: Simon McVittie <[email protected]>
Date:   Thu Sep 22 08:32:54 2016 +0100

    botlib: print long int correctly
    
    value has type long, or equivalently signed long int. In C,
    abs(some_long) returns int (to get a long result you would have to use
    labs(some_long) due to lack of overloading), but in C++ it returns long.
---
 codemp/botlib/l_precomp.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/codemp/botlib/l_precomp.cpp b/codemp/botlib/l_precomp.cpp
index 9560f97..34c094f 100644
--- a/codemp/botlib/l_precomp.cpp
+++ b/codemp/botlib/l_precomp.cpp
@@ -2510,7 +2510,7 @@ int PC_Directive_eval(source_t *source)
        token.whitespace_p = source->scriptstack->script_p;
        token.endwhitespace_p = source->scriptstack->script_p;
        token.linescrossed = 0;
-       sprintf(token.string, "%d", abs(value));
+       sprintf(token.string, "%ld", abs(value));
        token.type = TT_NUMBER;
        token.subtype = TT_INTEGER|TT_LONG|TT_DECIMAL;
        PC_UnreadSourceToken(source, &token);
@@ -2615,7 +2615,7 @@ int PC_DollarDirective_evalint(source_t *source)
        token.whitespace_p = source->scriptstack->script_p;
        token.endwhitespace_p = source->scriptstack->script_p;
        token.linescrossed = 0;
-       sprintf(token.string, "%d", abs(value));
+       sprintf(token.string, "%ld", abs(value));
        token.type = TT_NUMBER;
        token.subtype = TT_INTEGER|TT_LONG|TT_DECIMAL;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/openjk.git

_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to