summaryrefslogtreecommitdiff
path: root/preproc.c
diff options
context:
space:
mode:
authorKeith Kanios <keith@kanios.net>2007-10-13 07:09:22 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-10-13 07:09:22 -0700
commita5fc6467ab3bdd538a4731fdb0fc281bb599dc9e (patch)
treedd47a70955918240ddf17b73a6deaadc1453e321 /preproc.c
parentb263b504bc6a56dbb56ba8afff1a0c2d3869d64b (diff)
downloadnasm-a5fc6467ab3bdd538a4731fdb0fc281bb599dc9e.tar.gz
nasm-a5fc6467ab3bdd538a4731fdb0fc281bb599dc9e.tar.bz2
nasm-a5fc6467ab3bdd538a4731fdb0fc281bb599dc9e.zip
Fix 32-bit types in preproc.c and eval.c
Fix 32-bit types in preproc.c and eval.c that should have been 64-bit types. This allows %assign to work correctly with 64-bit integers.
Diffstat (limited to 'preproc.c')
-rw-r--r--preproc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/preproc.c b/preproc.c
index bcef30e..48e7207 100644
--- a/preproc.c
+++ b/preproc.c
@@ -386,7 +386,7 @@ static Token *expand_mmac_params(Token * tline);
static Token *expand_smacro(Token * tline);
static Token *expand_id(Token * tline);
static Context *get_ctx(char *name, bool all_contexts);
-static void make_tok_num(Token * tok, int32_t val);
+static void make_tok_num(Token * tok, int64_t val);
static void error(int severity, const char *fmt, ...);
static void *new_Block(size_t size);
static void delete_Blocks(void);
@@ -4005,10 +4005,10 @@ void pp_extra_stdmac(const char **macros)
extrastdmac = macros;
}
-static void make_tok_num(Token * tok, int32_t val)
+static void make_tok_num(Token * tok, int64_t val)
{
char numbuf[20];
- snprintf(numbuf, sizeof(numbuf), "%"PRId32"", val);
+ snprintf(numbuf, sizeof(numbuf), "%"PRId64"", val);
tok->text = nasm_strdup(numbuf);
tok->type = TOK_NUMBER;
}