aboutsummaryrefslogtreecommitdiff
path: root/src/lj_strfmt.h
diff options
context:
space:
mode:
authorMike Pall <mike>2020-06-13 00:52:54 +0200
committerMike Pall <mike>2020-06-15 02:52:00 +0200
commit8ae5170cdc9c307bd81019b3e014391c9fd00581 (patch)
treeccf9f17035d0754c1758faee209e9a26b4e03418 /src/lj_strfmt.h
parent8b55054473452963f24b01efb7c4cc72497c74ec (diff)
downloadluajit-8ae5170cdc9c307bd81019b3e014391c9fd00581.tar.gz
luajit-8ae5170cdc9c307bd81019b3e014391c9fd00581.tar.bz2
luajit-8ae5170cdc9c307bd81019b3e014391c9fd00581.zip
Improve assertions.
Diffstat (limited to 'src/lj_strfmt.h')
-rw-r--r--src/lj_strfmt.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_strfmt.h b/src/lj_strfmt.h
index 339f8e15..b4fbbb94 100644
--- a/src/lj_strfmt.h
+++ b/src/lj_strfmt.h
@@ -79,7 +79,8 @@ static LJ_AINLINE void lj_strfmt_init(FormatState *fs, const char *p, MSize len)
79{ 79{
80 fs->p = (const uint8_t *)p; 80 fs->p = (const uint8_t *)p;
81 fs->e = (const uint8_t *)p + len; 81 fs->e = (const uint8_t *)p + len;
82 lua_assert(*fs->e == 0); /* Must be NUL-terminated (may have NULs inside). */ 82 /* Must be NUL-terminated. May have NULs inside, too. */
83 lj_assertX(*fs->e == 0, "format not NUL-terminated");
83} 84}
84 85
85/* Raw conversions. */ 86/* Raw conversions. */