From: Wolfgang (Blub) Bumiller Date: Wed, 15 Aug 2012 15:01:16 +0000 (+0200) Subject: strpcy->memcpy X-Git-Tag: 0.1-rc1~274 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b7f9b20a2bcccb61f9a09ce38f14110b912d25a4;p=xonotic%2Fgmqcc.git strpcy->memcpy --- diff --git a/parser.c b/parser.c index 5091767..ff2192f 100644 --- a/parser.c +++ b/parser.c @@ -1701,9 +1701,9 @@ static bool parser_variable(parser_t *parser, ast_block *localblock) vx.name = mem_a(len+3); vy.name = mem_a(len+3); vz.name = mem_a(len+3); - strcpy(vx.name, varent.name); - strcpy(vy.name, varent.name); - strcpy(vz.name, varent.name); + memcpy(vx.name, varent.name, len); + memcpy(vy.name, varent.name, len); + memcpy(vz.name, varent.name, len); vx.name[len] = vy.name[len] = vz.name[len] = '_'; vx.name[len+1] = 'x'; vy.name[len+1] = 'y'; @@ -1940,9 +1940,9 @@ static bool parser_do(parser_t *parser) vx.name = mem_a(len+3); vy.name = mem_a(len+3); vz.name = mem_a(len+3); - strcpy(vx.name, varent.name); - strcpy(vy.name, varent.name); - strcpy(vz.name, varent.name); + memcpy(vx.name, varent.name, len); + memcpy(vy.name, varent.name, len); + memcpy(vz.name, varent.name, len); vx.name[len] = vy.name[len] = vz.name[len] = '_'; vx.name[len+1] = 'x'; vy.name[len+1] = 'y';