From 43f7e55b0bc8d9f46cc99ea6e9f95ecd18b0fa14 Mon Sep 17 00:00:00 2001 From: Mex Date: Thu, 21 Sep 2023 13:23:02 +0100 Subject: [PATCH] example --- examples/example2/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/example2/main.cpp b/examples/example2/main.cpp index e980e3a..1e193bc 100644 --- a/examples/example2/main.cpp +++ b/examples/example2/main.cpp @@ -21,7 +21,7 @@ void func1() bw.f32(32.0f); bw.f64(64.0); string str("abcde"); - bw.cstr((char*)str.data(), 5); + bw.cstr((char*)str.data(), 6); bw.mstr(str); Type1 type1; bw.st(type1); @@ -46,7 +46,7 @@ void func1() br.m_uiEndian = EEndian::INITIAL_ENDIAN; float data32 = br.f32(); double data64 = br.f64(); - str = br.cstr(5); + char *cstr = br.cstr(6); str = br.mstr(); type1 = br.st(); } \ No newline at end of file