fixed very obscure bug. In VS2010 the string was being trimmed before going into Construct method, but the string length was not updated.
Thus, Construct thought the string length was 1 greater than it should have been causing an out of bounds runtime exception. In VS2008, the same thing happened, however no exception was thrown since VS2008 allows access into the undefined memory space and returned a 0 (null) value when it tried to access outside the string array. This fix targets specifically the color filters since they seem to be the ones with the error. " color:g;" and not "color:g;" was being passed.
This commit is contained in:
@@ -71,7 +71,7 @@ WSrcCards * MTGPack::getPool(string poolstr)
|
||||
s = poolstr.find("unlocked");
|
||||
string sub = poolstr;
|
||||
if (s != string::npos)
|
||||
sub = poolstr.substr(s + 8);
|
||||
sub = trim(poolstr.substr(s + 8));
|
||||
if (sub.size())
|
||||
{
|
||||
mySrc->addFilter(ff->Construct(sub));
|
||||
|
||||
Reference in New Issue
Block a user