X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftape.c;h=c1e4bcea9f05cb67f8035a0af5cd0336c014cd6b;hb=881aea4bdbd831b4c5833a697d64b0a4bd7962ee;hp=aa5b06b19231d47a7a5750b2b4891da63c75eeeb;hpb=d0c23c650700e594e103d368efad02887c8587dc;p=rocksndiamonds.git diff --git a/src/tape.c b/src/tape.c index aa5b06b1..c1e4bcea 100644 --- a/src/tape.c +++ b/src/tape.c @@ -459,6 +459,8 @@ void TapeDeactivateDisplayOff(boolean redraw_display) if (redraw_display) { RedrawPlayfield(); + + UpdateGameDoorValues(); DrawGameDoorValues(); } } @@ -539,7 +541,11 @@ void TapeErase(void) tape.length_seconds = 0; if (leveldir_current) - setString(&tape.level_identifier, leveldir_current->identifier); + { + strncpy(tape.level_identifier, leveldir_current->identifier, + MAX_FILENAME_LEN); + tape.level_identifier[MAX_FILENAME_LEN] = '\0'; + } tape.level_nr = level_nr; tape.pos[tape.counter].delay = 0; @@ -1158,12 +1164,7 @@ static boolean checkTapesFromSameLevel(struct TapeInfo *t1, struct TapeInfo *t2) static void CopyTape(struct TapeInfo *tape_from, struct TapeInfo *tape_to) { - if (tape_to->level_identifier != NULL) - checked_free(tape_to->level_identifier); - *tape_to = *tape_from; - - tape_to->level_identifier = getStringCopy(tape_from->level_identifier); } static void SwapTapes(struct TapeInfo *t1, struct TapeInfo *t2)