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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user