sprintf into a buffer, not a random address

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4530 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2006-02-24 16:00:23 +00:00
parent 740fe7af2b
commit 0bed8171f5

View file

@ -2689,6 +2689,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
char *define=line.gettoken_str(1);
char *value;
char datebuf[256];
char mathbuf[256];
bool date=false;
if (!stricmp(define,"/date")) {
@ -2724,6 +2725,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
value1 = line.gettoken_int(3);
mathop = line.gettoken_str(4);
value2 = line.gettoken_int(5);
value = mathbuf;
if (!strcmp(mathop,"+")) {
sprintf(value,"%d",value1+value2);