flush
[m6w6/ext-psi] / psi.d / glob.psi
index 2bb952e57e6c7dc8bbae6d446abd555549544c06..72c0c76f9d48c2e9256405edd8004510a9aea84a 100644 (file)
@@ -2,14 +2,14 @@ function psi\glob(string $pattern, int $flags, array &$glob = NULL) : int {
        let path = strval($pattern);
        let flags = intval($flags);
        let err = NULL;
-       let buf = arrval($glob);
+       let buf = &arrval($glob);
        return to_int(glob);
        set $glob = to_array(*buf,
                to_int(gl_matchc),
                to_int(gl_pathc),
                to_int(gl_offs),
                to_int(gl_flags),
-               to_array(**gl_pathv, gl_pathc, gl_offs, to_string(*gl_pathv))
+               to_array(gl_pathv, gl_pathc + gl_offs, to_string(gl_pathv))
        );
        free globfree(buf);
 }