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

checker: restrict numeric promotions to cases where no data is lost

This commit is contained in:
Uwe Krüger
2020-05-27 05:42:48 +02:00
committed by GitHub
parent fc67046bac
commit 013fdb8a4b
81 changed files with 510 additions and 247 deletions

View File

@@ -19,7 +19,7 @@ pub fn getenv(key string) string {
return string_from_wide(s)
} $else {
s := C.getenv(key.str)
if s == 0 {
if s == voidptr(0) {
return ''
}
// NB: C.getenv *requires* that the result be copied.