Menu

#178 [wxJSON v1.2.1] Bug in wxJSONValue::GetInfo

CVS_HEAD
open
nobody
None
5
2022-02-11
2022-02-11
Sergey
No

Please note that the only correct template for size_t in printf is %zu.
If you try to use %d, it will fail in a x64 build. If you try to use %lld, it will fail in a x86/Win32 build.
So always use %zu for size_t parameters!

Replace here (jsonval.cpp):

    s.Printf( _T("Object: Type=%s Size=%d comments=<<<USE %zu INSTEAD OF %d>>>\n"),
            wxJSONValue::TypeToString( data->m_type ).c_str(),
            Size(), data->m_comments.GetCount() );

and in other calls of printf with size_t parameters.
Here data->m_comments.GetCount() has size_t type.

Thanks.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.