diff options
Diffstat (limited to 'src/gui/game/GameController.cpp')
| -rw-r--r-- | src/gui/game/GameController.cpp | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/gui/game/GameController.cpp b/src/gui/game/GameController.cpp index c514d3e..539b084 100644 --- a/src/gui/game/GameController.cpp +++ b/src/gui/game/GameController.cpp @@ -571,30 +571,13 @@ bool GameController::MouseUp(int x, int y, unsigned button) (*iter).pos((*iter).getText(sim), signx, signy, signw, signh); if (x>=signx && x<=signx+signw && y>=signy && y<=signy+signh) { - int match=0; const char* str=(*iter).text.c_str(); - const char* e; - if (str[0]=='{' && (str[1]=='c' || str[1]=='t') && str[2]==':' && str[3]>='0' && str[3]<='9') - { - const char* p=str+4; - while (*p>='0' && *p<='9') - p++; - e=p; - if (*p=='|') - { - while (*p) - p++; - if (p[-1]=='}') - { - match=1; - } - } - } - if (match) + int pos=splitsign(str); + if (pos) { char buff[256]; strcpy(buff, str+3); - buff[e-str-3]=0; + buff[pos]=0; int tempSaveID = format::StringToNumber<int>(std::string(buff)); if (tempSaveID) { |
