1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2024-12-23 21:25:43 +00:00

Get rid of the +1 -1 thing.

This commit is contained in:
King_DuckZ 2017-06-23 19:02:37 +01:00
parent ecb44e725a
commit 6589ddd86f
2 changed files with 3 additions and 3 deletions

View file

@ -14,8 +14,8 @@ set(lua_scripts_for_redis_content "//File autogenerated by cmake, changes will b
namespace kamokan {
extern const char g_save_script[] = R\"lua(${save_pastie})lua\";
extern const char g_load_script[] = R\"lua(${retrieve_pastie})lua\";
extern const std::size_t g_save_script_size = ${save_pastie_length} + 1;
extern const std::size_t g_load_script_size = ${retrieve_pastie_length} + 1;
extern const std::size_t g_save_script_size = ${save_pastie_length};
extern const std::size_t g_load_script_size = ${retrieve_pastie_length};
} //namespace kamokan
")

View file

@ -175,7 +175,7 @@ namespace kamokan {
if (not retval.valid_token)
return retval;
redis::Script retrieve = m_redis->command().make_script(boost::string_view(g_load_script, g_load_script_size - 1));
redis::Script retrieve = m_redis->command().make_script(boost::string_view(g_load_script, g_load_script_size));
auto batch = m_redis->command().make_batch();
retrieve.run(batch, std::make_tuple(parToken), std::make_tuple());
auto raw_replies = batch.replies();