Skip to content

Commit

Permalink
Fix translations getting truncated prematurely (#1640)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrianilloo authored Nov 16, 2021
1 parent 589fc96 commit 18f9d65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/logic/sprintf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@ size_t atcprintf(char *buffer, size_t maxlen, const char *format, IPluginContext
cell_t *target;
pCtx->LocalToString(params[arg++], &key);
pCtx->LocalToPhysAddr(params[arg++], &target);
res = Translate(buf_p, llen, pCtx, key, *target, params, &arg, &error);
res = Translate(buf_p, llen + 1, pCtx, key, *target, params, &arg, &error);
if (error)
{
return 0;
Expand All @@ -1235,7 +1235,7 @@ size_t atcprintf(char *buffer, size_t maxlen, const char *format, IPluginContext
size_t res;
cell_t target = bridge->GetGlobalTarget();
pCtx->LocalToString(params[arg++], &key);
res = Translate(buf_p, llen, pCtx, key, target, params, &arg, &error);
res = Translate(buf_p, llen + 1, pCtx, key, target, params, &arg, &error);
if (error)
{
return 0;
Expand Down

0 comments on commit 18f9d65

Please sign in to comment.