Skip to content

Commit

Permalink
fix deserialization of submaps
Browse files Browse the repository at this point in the history
Use initializer list rather than constructor call: only initializer list guarantees left-to-right evaluation. (CleverRaven#41279)
(see C++ spec dcl.init.list #4)
  • Loading branch information
FeepingCreature authored Jun 13, 2020
1 parent a9385fc commit 8b2d5e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mapbuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ void mapbuffer::deserialize( JsonIn &jsin )
version = jsin.get_int();
} else if( submap_member_name == "coordinates" ) {
jsin.start_array();
tripoint loc( jsin.get_int(), jsin.get_int(), jsin.get_int() );
tripoint loc{ jsin.get_int(), jsin.get_int(), jsin.get_int() };
jsin.end_array();
submap_coordinates = loc;
} else {
Expand Down

0 comments on commit 8b2d5e7

Please sign in to comment.