Script: Fixed that SKIN:ParseFormula didn't work with numbers

NowPlaying.dll: Fixed a few TagLib memory leaks.
This commit is contained in:
Birunthan Mohanathas
2012-03-12 18:11:10 +00:00
parent a57d75399c
commit 476eaf1679
5 changed files with 20 additions and 14 deletions

View File

@ -106,13 +106,14 @@ static int ParseFormula(lua_State* L)
std::wstring strTmp = LuaManager::ToWide(L, 2);
double result;
if (self->GetParser().ParseFormula(strTmp, &result))
if (!self->GetParser().ParseFormula(strTmp, &result))
{
lua_pushnumber(L, result);
return 1;
result = lua_tonumber(L, 2);
}
return 0;
lua_pushnumber(L, result);
return 1;
}
static int MoveWindow(lua_State* L)