OSDN Git Service

strncmp判定誤り
authoryukihane <yukihane.feather@gmail.com>
Wed, 21 Sep 2011 15:21:29 +0000 (00:21 +0900)
committeryukihane <yukihane.feather@gmail.com>
Wed, 21 Sep 2011 17:28:22 +0000 (02:28 +0900)
vhook/framehook.c

index b1b5ca1..9d7dd26 100644 (file)
@@ -128,7 +128,7 @@ int init_setting(FILE*log,const toolbox *tbox,SETTING* setting,int argc, char *a
             const char* const prefix = FRAMEHOOK_OPT_DATA[j];
             const int prefix_len = strlen(prefix);
             SETTING_COMMENT* const comset = &setting->comment[j];
             const char* const prefix = FRAMEHOOK_OPT_DATA[j];
             const int prefix_len = strlen(prefix);
             SETTING_COMMENT* const comset = &setting->comment[j];
-            if (!comset->path && strncmp(prefix, arg, prefix_len)) {
+            if (!comset->path && !strncmp(prefix, arg, prefix_len)) {
                 const char* data = arg + prefix_len;
                 comset->path = data;
                 comset->enable = TRUE;
                 const char* data = arg + prefix_len;
                 comset->path = data;
                 comset->enable = TRUE;