Fixed all invalid mmeory accesses

This commit is contained in:
Dale Weiler 2012-04-28 06:31:16 -04:00
parent b09d75518c
commit 1d6594a491
3 changed files with 6 additions and 12 deletions

4
asm.c
View file

@ -161,10 +161,6 @@ static inline bool asm_parse_func(const char *skip, size_t line, asm_state *stat
mem_d(name);
return false;
}
/* reassign name */
mem_d(name);
name = util_strchp(name, strchr(name, ','));
/*
* Now add the following items to the code system:
* function

10
util.c
View file

@ -127,13 +127,11 @@ char *util_strchp(const char *s, const char *e) {
if (!s || !e)
return NULL;
size_t m = 0;
char *c = util_strdup(s);
while (s != e)
s++,c++,m++;
const char *c = s;
while (c != e)
c++;
*c = '\0';
return c-m;
return util_strdup(s);
}
/*