Fixed a bug with my_strstr
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@926 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
52d70d4a8c
commit
5275f4c2ca
2 changed files with 2 additions and 0 deletions
|
@ -39,6 +39,7 @@ void *my_memset(void *dest, int c, size_t count) {
|
|||
|
||||
char *my_strstr(const char *string, const char *strCharSet) {
|
||||
if (!*strCharSet) return (char*)string;
|
||||
if (lstrlen(string) < lstrlen(strCharSet)) return 0;
|
||||
size_t chklen=lstrlen(string)-lstrlen(strCharSet);
|
||||
char *s1, *s2;
|
||||
for (size_t i = 0; i < chklen; i++) {
|
||||
|
|
|
@ -164,6 +164,7 @@ char *my_strstr(const char *string, const char *strCharSet) {
|
|||
char *s1, *s2;
|
||||
size_t chklen;
|
||||
size_t i;
|
||||
if (lstrlen(string) < lstrlen(strCharSet)) return 0;
|
||||
if (!*strCharSet) return (char*)string;
|
||||
chklen=lstrlen(string)-lstrlen(strCharSet);
|
||||
for (i = 0; i < chklen; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue