1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: fix infix expr with number overflow (fix #18905) (#18936)

This commit is contained in:
yuyi
2023-07-23 18:18:22 +08:00
committed by GitHub
parent 15fdfd7bcf
commit e1758bc0c5
7 changed files with 38 additions and 14 deletions

View File

@@ -118,7 +118,7 @@ pub fn (t Time) local() Time {
hour: st_local.hour
minute: st_local.minute
second: st_local.second // These are the same
microsecond: st_local.millisecond * 1000
microsecond: int(st_local.millisecond) * 1000
unix: st_local.unix_time()
}
return t_local
@@ -141,7 +141,7 @@ fn win_now() Time {
hour: st_local.hour
minute: st_local.minute
second: st_local.second
microsecond: st_local.millisecond * 1000
microsecond: int(st_local.millisecond) * 1000
unix: st_local.unix_time()
is_local: true
}
@@ -163,7 +163,7 @@ fn win_utc() Time {
hour: st_utc.hour
minute: st_utc.minute
second: st_utc.second
microsecond: st_utc.millisecond * 1000
microsecond: int(st_utc.millisecond) * 1000
unix: st_utc.unix_time()
is_local: false
}