mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
when copying strings between structs, realloc, don't just copy ptrs.
This commit is contained in:
parent
ef15f50edf
commit
11d6f7417e
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue