diff --git a/samples/parse_check.c b/samples/parse_check.c index 1959e96..b9386c7 100644 --- a/samples/parse_check.c +++ b/samples/parse_check.c @@ -19,4 +19,4 @@ int main(int argument_count, char **arguments) } return 0; -} \ No newline at end of file +} diff --git a/source/md_stb_sprintf.h b/source/md_stb_sprintf.h index 228aa82..c5b5fcc 100644 --- a/source/md_stb_sprintf.h +++ b/source/md_stb_sprintf.h @@ -583,13 +583,11 @@ cl = lg; \ MD_String8 str = va_arg(va, MD_String8); //- rjf: get string length + s = (char *)str.str; + sn = (const char *)(str.str + str.size); l = str.size; //- rjf: clamp to precision - if (l > (stbsp__uint32)pr) - { - l = pr; - } lead[0] = 0; tail[0] = 0; pr = 0; diff --git a/tests/cpp_build_test.cpp b/tests/cpp_build_test.cpp index c9c8ad0..1bd12ff 100644 --- a/tests/cpp_build_test.cpp +++ b/tests/cpp_build_test.cpp @@ -3,8 +3,9 @@ int main(void) { - MD_String8 str = "foobar"_md; + MD_String8 foo = "foo"_md; + MD_String8 bar = "bar"_md; + MD_String8 str = MD_PushStringF("%S%S", foo, bar); printf("%.*s", MD_StringExpand(str)); - return 0; }