scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit caefe72083c923425fbea1a990840cf4721263cb
parent 769d229c5a8a0b0ce9da52d181c592fbba272583
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date:   Wed, 22 Apr 2026 09:18:35 +0200

libc/time: Fix overflow check in mktime()

Diffstat:
Msrc/libc/time/mktime.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libc/time/mktime.c b/src/libc/time/mktime.c @@ -142,7 +142,7 @@ mktime(struct tm *ptm) } if (off > 0 && t > _TIME_MAX - off - || off < 0 && t < _TIME_MIN + off) { + || off < 0 && t < _TIME_MIN - off) { return -1; } t += off;