From e91e2498c7ec37ffbbe948cd29bb15eedec85957 Mon Sep 17 00:00:00 2001 From: yexo Date: Mon, 30 Aug 2010 10:49:02 +0000 Subject: (svn r20693) -Fix: use strncmp instead of memcmp for comparing strings --- src/ini.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ini.cpp b/src/ini.cpp index f249f7b93..d79189bd2 100644 --- a/src/ini.cpp +++ b/src/ini.cpp @@ -114,7 +114,7 @@ IniGroup *IniFile::GetGroup(const char *name, size_t len) /* does it exist already? */ for (IniGroup *group = this->group; group != NULL; group = group->next) { - if (!memcmp(group->name, name, len) && group->name[len] == 0) { + if (!strncmp(group->name, name, len) && group->name[len] == 0) { return group; } } @@ -133,7 +133,7 @@ void IniFile::RemoveGroup(const char *name) /* does it exist already? */ for (group = this->group; group != NULL; prev = group, group = group->next) { - if (memcmp(group->name, name, len) == 0) { + if (strncmp(group->name, name, len) == 0) { break; } } -- cgit v1.2.3-70-g09d2