*** empty log message ***

This commit is contained in:
David Rose 2001-04-09 21:56:12 +00:00
parent bdaf2f3858
commit 773da00dd4
1 changed files with 3 additions and 1 deletions

View File

@ -56,16 +56,18 @@ get_datagram(Datagram &data) {
PN_uint32 num_bytes = di.get_uint32();
// Now, read the datagram itself.
char *buffer = (char *)alloca(num_bytes);
char *buffer = new char[num_bytes];
nassertr(buffer != (char *)NULL, false);
_in.read(buffer, num_bytes);
if (_in.fail() || _in.eof()) {
_error = true;
delete[] buffer;
return false;
}
data = Datagram(buffer, num_bytes);
delete[] buffer;
return true;
}