From ea351e99fcab952a0d34f38178caf5f2bdca680f Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Tue, 25 Oct 2022 22:07:55 -0300 Subject: [PATCH] VISO: Fix small mistake in timestamp clamping --- src/cdrom/cdrom_image_viso.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cdrom/cdrom_image_viso.c b/src/cdrom/cdrom_image_viso.c index 6d76ed3f6..ab9cf658a 100644 --- a/src/cdrom/cdrom_image_viso.c +++ b/src/cdrom/cdrom_image_viso.c @@ -420,8 +420,8 @@ viso_fill_time(uint8_t *data, time_t time, int format, int longform) if (!time_s) { /* localtime will return NULL if the time_t is negative (Windows) or way too far into 64-bit space (Linux). Fall back to epoch. */ - time = 0; - time_s = localtime(&time); + time_t epoch = 0; + time_s = localtime(&epoch); if (!time_s) fatal("VISO: localtime(0) = NULL\n");