From d95538c3e510e6497949f51ed2b8b7d2cbe7ac8e Mon Sep 17 00:00:00 2001 From: "Alexander S. Aganichev" Date: Sun, 10 Dec 2000 08:29:00 +0000 Subject: [PATCH] Fixed incorrect Macro processing, stripping spaces around origin, bit stablized crashmail parser --- golded3/geglob.cpp | 4 ++-- golded3/gemenu.cpp | 1 + goldlib/gcfg/gxcrash.cpp | 11 +++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/golded3/geglob.cpp b/golded3/geglob.cpp index 876a5c2..ad88703 100644 --- a/golded3/geglob.cpp +++ b/golded3/geglob.cpp @@ -258,7 +258,7 @@ int IsMacro(gkey key, int type) { vector::iterator m = CFG->macro.begin(); while(m != CFG->macro.end()) { - if((key == m->key) and (type == m->type)) + if(((key == m->key) or (tolower(key) == m->key) or (toupper(key) == m->key)) and (type == m->type)) return true; m++; } @@ -273,7 +273,7 @@ int PlayMacro(gkey key, int type) { vector::iterator m = CFG->macro.begin(); while(m != CFG->macro.end()) { - if((key == m->key) and (type == m->type)) { + if(((key == m->key) or (tolower(key) == m->key) or (toupper(key) == m->key)) and (type == m->type)) { RunMacro(m); return true; } diff --git a/golded3/gemenu.cpp b/golded3/gemenu.cpp index c8775fc..8c487c3 100644 --- a/golded3/gemenu.cpp +++ b/golded3/gemenu.cpp @@ -530,6 +530,7 @@ int SelectFromFile(const char* file, char* selection, const char* title, const c if(n != -1) { strcpy(selection, Listi[n]); strtrim(selection); + strltrim(selection); retval = true; } for(n=0; n