From 065a5156e27f1da4b4ec4d6b5680f9b73f079c98 Mon Sep 17 00:00:00 2001 From: Phitherek Date: Sun, 16 Sep 2012 02:24:48 +0200 Subject: [PATCH] made parsers less strict - allowed whitespaces --- 3m.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/3m.cpp b/3m.cpp index 56d5ef2..af5351d 100644 --- a/3m.cpp +++ b/3m.cpp @@ -243,6 +243,7 @@ for(int i = 0; i < size; i++) { int erased; line = strgetline(&modlist, &erased); size -= erased; + if(line[0] != NULL && line[0] != ' ' && line[0] != '\n') { if(action == "detect") { if(line[0] == '{') { string name = ""; @@ -305,6 +306,7 @@ for(int i = 0; i < size; i++) { return 1; } } +} *rmodlist = tmpv; return 0; } @@ -317,6 +319,7 @@ for(int i = 0; i < size; i++) { int erased; line = strgetline(&modinfo, &erased); size -= erased; + if(line[0] != NULL && line[0] != ' ' && line[0] != '\n') { if(action == "detect") { if(line[0] == '{') { string name = ""; @@ -402,6 +405,7 @@ for(int i = 0; i < size; i++) { return 1; } } +} *mis = tmp; return 0; }