CVS Commit by dpage: Attached patch fixes coredump in non-Unicode
require($_SERVER['DOCUMENT_ROOT']."/includes/top_config.php");
?>
CVS Commit by dpage: Attached patch fixes coredump in non-Unicode
Log Message:
-----------
Attached patch fixes coredump in non-Unicode version of pgadmin3.
This allows to build (non-Unicode) pgadmin3 on FreeBSD 4.x.
[Max Khon]
Modified Files:
--------------
pgadmin3/src/utils:
utffile.cpp (r1.8 -> r1.9)
Index: utffile.cpp
===================================================================
RCS file: /projects/pgadmin3/src/utils/utffile.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/utils/utffile.cpp -Lsrc/utils/utffile.cpp -u -w -r1.8 -r1.9
--- src/utils/utffile.cpp
+++ src/utils/utffile.cpp
@@ -83,7 +83,12 @@
if (decr)
Seek(-decr, wxFromCurrent);
- m_conversion->MB2WC((wchar_t*)(wxChar*)wxStringBuffer(str, nLen), (const char*)buffer, (size_t)(nLen+1));
+#if wxUSE_UNICODE
+ size_t buf_len = nLen;
+#else
+ size_t buf_len = nLen * sizeof(wchar_t);
+#endif
+ m_conversion->MB2WC((wchar_t*)(wxChar*)wxStringBuffer(str, buf_len), (const char*)buffer, (size_t)(nLen+1));
}
else
str = (wxChar*)buffer;
Home |
Main Index |
Thread Index