Skip to content

Commit c71526c

Browse files
committed
use code block
1 parent 46466f5 commit c71526c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/controller/c/supervisor.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,13 +1179,15 @@ static void supervisor_read_answer(WbDevice *d, WbRequest *r) {
11791179
case C_SUPERVISOR_MOVIE_STATUS:
11801180
movie_status = request_read_uchar(r);
11811181
break;
1182-
case C_SUPERVISOR_SIMULATION_RESET:
1183-
WbFieldRef field = field_list;
1182+
case C_SUPERVISOR_SIMULATION_RESET: {
1183+
// Clear cached field values
1184+
WbFieldStruct *field = field_list;
11841185
while (field) {
11851186
field->last_update = -DBL_MAX;
11861187
field = field->next;
11871188
}
11881189
break;
1190+
}
11891191
case C_SUPERVISOR_SAVE_WORLD:
11901192
save_status = request_read_uchar(r);
11911193
break;

0 commit comments

Comments
 (0)