Skip to content

Commit

Permalink
Fixed issue with certain strings not being converted to chars as they…
Browse files Browse the repository at this point in the history
… should
  • Loading branch information
Andrettin committed Nov 30, 2015
1 parent 0bcfe03 commit 499a922
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/stratagus/script_character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static int CclDefineCharacter(lua_State *l)
if (ability_id != -1) {
character->Abilities.push_back(AllUpgrades[ability_id]);
} else {
LuaError(l, "Ability \"%s\" doesn't exist." _C_ ability_ident);
LuaError(l, "Ability \"%s\" doesn't exist." _C_ ability_ident.c_str());
}
}
} else if (!strcmp(value, "ForbiddenUpgrades")) {
Expand All @@ -205,7 +205,7 @@ static int CclDefineCharacter(lua_State *l)
if (unit_type_id != -1) {
character->ForbiddenUpgrades[unit_type_id] = true;
} else {
LuaError(l, "Unit type \"%s\" doesn't exist." _C_ unit_type_ident);
LuaError(l, "Unit type \"%s\" doesn't exist." _C_ unit_type_ident.c_str());
}
}
} else {
Expand Down Expand Up @@ -303,7 +303,7 @@ static int CclDefineCustomHero(lua_State *l)
if (ability_id != -1) {
hero->Abilities.push_back(AllUpgrades[ability_id]);
} else {
LuaError(l, "Ability \"%s\" doesn't exist." _C_ ability_ident);
LuaError(l, "Ability \"%s\" doesn't exist." _C_ ability_ident.c_str());
}
}
} else if (!strcmp(value, "QuestsInProgress")) {
Expand All @@ -314,7 +314,7 @@ static int CclDefineCustomHero(lua_State *l)
if (GetQuest(quest_name) != NULL) {
hero->QuestsInProgress.push_back(GetQuest(quest_name));
} else {
LuaError(l, "Quest \"%s\" doesn't exist." _C_ quest_name);
LuaError(l, "Quest \"%s\" doesn't exist." _C_ quest_name.c_str());
}
}
} else if (!strcmp(value, "QuestsCompleted")) {
Expand All @@ -325,7 +325,7 @@ static int CclDefineCustomHero(lua_State *l)
if (GetQuest(quest_name) != NULL) {
hero->QuestsCompleted.push_back(GetQuest(quest_name));
} else {
LuaError(l, "Quest \"%s\" doesn't exist." _C_ quest_name);
LuaError(l, "Quest \"%s\" doesn't exist." _C_ quest_name.c_str());
}
}
} else {
Expand Down

0 comments on commit 499a922

Please sign in to comment.