From 835188124a6e590b406d81803b8d47f07884a9ea Mon Sep 17 00:00:00 2001 From: Haru Date: Mon, 26 Aug 2013 19:14:26 +0200 Subject: Added an integer overflow check on literal values in the script parser - When attempting to use a value greater than INT_MAX or smaller than INT_MIN (about +/- 2 billions), an error message will be shown and script execution will be aborted. - Corrected some scripts that were attempting to use such values. - Fixed some possible issues when using literal negative values in scripts. Thanks to Ind for his help on this issue (figuring it out and fixing it) Signed-off-by: Haru --- doc/script_commands.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 2e8afe5dd..b10c7aef0 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -404,7 +404,9 @@ are otherwise identical. Writing a number like '0x' will make it recognized as a hexadecimal value. Notice that 0x10 is equal to 16. Also notice that if you try to 'mes 0x10' it will print '16'. -This is not used much, but it pays to know about it. +Number values can't exceed the limits of an integer variable: Any number +greater than INT_MAX (2147483647) or smaller than INT_MIN (-2147483648) will +not be recognized. Variables --------- -- cgit v1.2.3-60-g2f50