Browse Source

Removed a useless variable and changed index types from int to size_t. I'll probably rewrite this later.

release/0.19
JustinAJ 11 years ago
parent
commit
0f70e36e82
  1. 8
      Jupiter/Functions.c

8
Jupiter/Functions.c

@ -159,9 +159,8 @@ size_t Jupiter_vstrlen(const void *str, size_t size)
const char *stristr(const char *str1, const char *str2) const char *stristr(const char *str1, const char *str2)
{ {
const char *strr; size_t i;
int i; size_t a;
int a;
for (i = 0; str1[i] != 0; i++) for (i = 0; str1[i] != 0; i++)
{ {
if (toupper(str1[i]) == toupper(str2[0])) if (toupper(str1[i]) == toupper(str2[0]))
@ -174,8 +173,7 @@ const char *stristr(const char *str1, const char *str2)
} }
if (str2[a] == 0) if (str2[a] == 0)
{ {
strr = &str1[i]; return str1 + i;
return strr;
} }
} }
} }

Loading…
Cancel
Save