Skip to content
Snippets Groups Projects
Commit 45568b1d authored by Vaastav Anand's avatar Vaastav Anand
Browse files

Fix string conversion whilst setting and joining baggage

parent c4287387
No related branches found
No related tags found
Loading
......@@ -14,8 +14,8 @@ Baggage getBaggageFromLua(lua_State* L) {
std::cout << "Baggage not provided as an argument" << std::endl;
} else {
size_t len;
baggage_string = lua_tolstring(L, 1, &len);
std::cout << "Length of string is " << len << std::endl;
const char* baggage = lua_tolstring(L, 1, &len);
baggage_string.assign(baggage, baggage + len);
}
Baggage b = Baggage::deserialize(baggage_string);
......@@ -23,7 +23,6 @@ Baggage getBaggageFromLua(lua_State* L) {
}
int SetBaggage(lua_State* L) {
std::cout << "Setting baggage\n";
Baggage b = getBaggageFromLua(L);
SET_CURRENT_BAGGAGE(b);
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment