Skip to content

Commit 07e2423

Browse files
committed
use code block
1 parent b9d12b1 commit 07e2423

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
@@ -1295,13 +1295,15 @@ static void supervisor_read_answer(WbDevice *d, WbRequest *r) {
12951295
case C_SUPERVISOR_MOVIE_STATUS:
12961296
movie_status = request_read_uchar(r);
12971297
break;
1298-
case C_SUPERVISOR_SIMULATION_RESET:
1299-
WbFieldRef field = field_list;
1298+
case C_SUPERVISOR_SIMULATION_RESET: {
1299+
// Clear cached field values
1300+
WbFieldStruct *field = field_list;
13001301
while (field) {
13011302
field->last_update = -DBL_MAX;
13021303
field = field->next;
13031304
}
13041305
break;
1306+
}
13051307
case C_SUPERVISOR_SAVE_WORLD:
13061308
save_status = request_read_uchar(r);
13071309
break;

0 commit comments

Comments
 (0)