import jneurla's fixes

TOASTERS ON FIRE

WORLD IN CHAOS

ONLY OLEGDB
This commit is contained in:
Christine Dodrill 2015-06-19 16:14:27 -07:00
parent 39c986666f
commit 84ca81cdd5
1 changed files with 4 additions and 4 deletions

View File

@ -7,17 +7,17 @@
// right hand side, length and returns 1 if the right hand side (needle) is inside the left hand
// side (haystack).
static int string_compare_guy(char* lhs, int llength, char* rhs, int rlength) {
char* lnz = alloca(llength + 1);
char lnz[llength + 1];
memcpy(lnz, lhs, llength);
lnz[llength] = 0;
char* rnz = alloca(rlength + 1);
char rnz[rlength + 1];
memcpy(rnz, rhs, rlength);
rnz[rlength] = 0;
int result = (intptr_t) strstr(lnz, rhs);
char *result = strstr(lnz, rhs);
return result;
return result == NULL ? 0 : 1;
}
int main() {