X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftape.c;h=c1e4bcea9f05cb67f8035a0af5cd0336c014cd6b;hb=f5b65dacd63ac8767720f317ed227291a286e306;hp=2300f00b2d89b9f34015ca76998fbeac4de6e7e9;hpb=c389f75f068f6fe96a8ecf8d4cb3ce12f731921e;p=rocksndiamonds.git diff --git a/src/tape.c b/src/tape.c index 2300f00b..c1e4bcea 100644 --- a/src/tape.c +++ b/src/tape.c @@ -541,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; @@ -1160,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)