mirror of
https://github.com/fmtlib/fmt.git
synced 2026-05-05 12:04:11 +02:00
Fix handling of unsigned char strings in printf
This commit is contained in:
@@ -447,6 +447,12 @@ TEST(PrintfTest, String) {
|
||||
EXPECT_PRINTF(L" (null)", L"%10s", null_wstr);
|
||||
}
|
||||
|
||||
TEST(PrintfTest, UCharString) {
|
||||
unsigned char str[] = "test";
|
||||
unsigned char* pstr = str;
|
||||
EXPECT_EQ("test", fmt::sprintf("%s", pstr));
|
||||
}
|
||||
|
||||
TEST(PrintfTest, Pointer) {
|
||||
int n;
|
||||
void* p = &n;
|
||||
|
||||
Reference in New Issue
Block a user