mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fix i64 overflow warning
This commit is contained in:
committed by
Alexander Medvednikov
parent
ef71867bb0
commit
c8de2c0bd4
@@ -865,7 +865,9 @@ pub fn realpath(fpath string) string {
|
||||
res = int( C._fullpath( fullpath, fpath.str, MAX_PATH ) )
|
||||
}
|
||||
$else{
|
||||
res = int( C.realpath( fpath.str, fullpath ) )
|
||||
// here we want an int==0 if realpath failed, in which case
|
||||
// realpath would return NULL, and !isnil(NULL) would be false==0
|
||||
res = int( !isnil(C.realpath( fpath.str, fullpath )) )
|
||||
}
|
||||
if res != 0 {
|
||||
return string(fullpath, vstrlen(fullpath))
|
||||
|
||||
Reference in New Issue
Block a user