when copying strings between structs, realloc, don't just copy ptrs.

This commit is contained in:
eehouse 2010-03-13 23:10:11 +00:00
parent ef15f50edf
commit 11d6f7417e

View file

@ -22,8 +22,12 @@ public class LocalPlayer {
{
isLocal = src.isLocal;
isRobot = src.isRobot;
name = src.name;
password = src.password;
if ( null != src.name ) {
name = new String(src.name);
}
if ( null != src.password ) {
password = new String(src.password);
}
secondsUsed = src.secondsUsed;
}
}