From 3f8dfa54581750e47851e7502d180425c6a65d48 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 6 Mar 2017 23:17:30 +0100 Subject: [PATCH] fix lua builds --- src/bindings/lua/lua_platf.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bindings/lua/lua_platf.cpp b/src/bindings/lua/lua_platf.cpp index 5a72c1cfca..dea2bab15a 100644 --- a/src/bindings/lua/lua_platf.cpp +++ b/src/bindings/lua/lua_platf.cpp @@ -335,7 +335,8 @@ int console_add_route(lua_State *L) { "Attribute 'links' must be specified for any route and must be a string (different links separated by commas or single spaces."); route.link_list = new std::vector(); std::vector names; - boost::split(names, lua_tostring(L, -1), boost::is_any_of(", \t\r\n")); + const char* str = lua_tostring(L, -1); + boost::split(names, str, boost::is_any_of(", \t\r\n")); if (names.empty()) { /* unique name */ route.link_list->push_back(simgrid::surf::LinkImpl::byName(lua_tostring(L, -1))); @@ -415,7 +416,8 @@ int console_add_ASroute(lua_State *L) { lua_gettable(L,-2); ASroute.link_list = new std::vector(); std::vector names; - boost::split(names, lua_tostring(L, -1), boost::is_any_of(", \t\r\n")); + const char* str = lua_tostring(L, -1); + boost::split(names, str, boost::is_any_of(", \t\r\n")); if (names.empty()) { /* unique name with no comma */ ASroute.link_list->push_back(simgrid::surf::LinkImpl::byName(lua_tostring(L, -1))); -- 2.20.1