mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
fix gcc 3.2 crash
This commit is contained in:
parent
34d313acb6
commit
b15a2ae9fc
@ -366,7 +366,12 @@ append_data(const string &data) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE string Datagram::
|
INLINE string Datagram::
|
||||||
get_message() const {
|
get_message() const {
|
||||||
return string((const char *)_data.p(), _data.size());
|
// Silly special case for gcc 3.2, which can't tolerate string(NULL, 0).
|
||||||
|
if (_data.size() == 0) {
|
||||||
|
return string();
|
||||||
|
} else {
|
||||||
|
return string((const char *)_data.p(), _data.size());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user