Permalink
Browse files

print warning when stream cannot be opened, too

  • Loading branch information...
fizzet committed Apr 14, 2013
1 parent 6f958cd commit 6543dcdfe114150d9feb879c7d4af7854a30dfd8
Showing with 2 additions and 5 deletions.
  1. +2 −5 gemrb/core/Interface.cpp
View
@@ -5200,11 +5200,8 @@ int Interface::WriteCharacter(const char *name, Actor *actor)
{
FileStream str;
- if (!str.Create( Path, name, IE_CHR_CLASS_ID ))
- return -1;
-
- int ret = gm->PutActor(&str, actor, true);
- if (ret <0) {
+ if (!str.Create( Path, name, IE_CHR_CLASS_ID )
+ || (gm->PutActor(&str, actor, true) < 0)) {
Log(WARNING, "Core", "Character cannot be saved: %s", name);
return -1;
}

0 comments on commit 6543dcd

Please sign in to comment.