Pass format flags down to AddString
This commit is contained in:
parent
886c358e91
commit
9008705b9d
@ -147,7 +147,7 @@ error_out:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddString(char **buf_p, size_t &maxlen, const char *string, int width, int prec)
|
void AddString(char **buf_p, size_t &maxlen, const char *string, int width, int prec, int flags)
|
||||||
{
|
{
|
||||||
int size = 0;
|
int size = 0;
|
||||||
char *buf;
|
char *buf;
|
||||||
@ -212,7 +212,7 @@ void AddFloat(char **buf_p, size_t &maxlen, double fval, int width, int prec, in
|
|||||||
|
|
||||||
if (ke::IsNaN(fval))
|
if (ke::IsNaN(fval))
|
||||||
{
|
{
|
||||||
AddString(buf_p, maxlen, "NaN", width, prec);
|
AddString(buf_p, maxlen, "NaN", width, prec, flags);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -750,7 +750,7 @@ reswitch:
|
|||||||
}
|
}
|
||||||
const char *str = (const char *)params[curparam];
|
const char *str = (const char *)params[curparam];
|
||||||
curparam++;
|
curparam++;
|
||||||
AddString(&buf_p, llen, str, width, prec);
|
AddString(&buf_p, llen, str, width, prec, flags);
|
||||||
arg++;
|
arg++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1141,7 +1141,7 @@ reswitch:
|
|||||||
sizeof(buffer),
|
sizeof(buffer),
|
||||||
"Console<0><Console><Console>");
|
"Console<0><Console><Console>");
|
||||||
}
|
}
|
||||||
AddString(&buf_p, llen, buffer, width, prec);
|
AddString(&buf_p, llen, buffer, width, prec, flags);
|
||||||
arg++;
|
arg++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1156,7 +1156,7 @@ reswitch:
|
|||||||
if (!bridge->DescribePlayer(*value, &name, nullptr, nullptr))
|
if (!bridge->DescribePlayer(*value, &name, nullptr, nullptr))
|
||||||
return pCtx->ThrowNativeError("Client index %d is invalid", *value);
|
return pCtx->ThrowNativeError("Client index %d is invalid", *value);
|
||||||
}
|
}
|
||||||
AddString(&buf_p, llen, name, width, prec);
|
AddString(&buf_p, llen, name, width, prec, flags);
|
||||||
arg++;
|
arg++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1165,7 +1165,7 @@ reswitch:
|
|||||||
CHECK_ARGS(0);
|
CHECK_ARGS(0);
|
||||||
char *str;
|
char *str;
|
||||||
pCtx->LocalToString(params[arg], &str);
|
pCtx->LocalToString(params[arg], &str);
|
||||||
AddString(&buf_p, llen, str, width, prec);
|
AddString(&buf_p, llen, str, width, prec, flags);
|
||||||
arg++;
|
arg++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user