Skip to content

Commit

Permalink
Fix getArray
Browse files Browse the repository at this point in the history
  • Loading branch information
dnjulek committed Apr 15, 2024
1 parent 0183588 commit 4ea9ded
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/zigapi.zig
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ pub const Map = struct {
const len = self.numElements(key);
if (len) |n| {
var err: vs.MapPropertyError = undefined;
const arr_ptr = self.vsapi.?.mapGetIntArray.?(self.in, key.ptr, 0, &err);
const arr_ptr = self.vsapi.?.mapGetIntArray.?(self.in, key.ptr, &err);
return if (err == .Success) arr_ptr.?[0..n] else null;
} else return null;
}
Expand All @@ -203,7 +203,7 @@ pub const Map = struct {
const len = self.numElements(key);
if (len) |n| {
var err: vs.MapPropertyError = undefined;
const arr_ptr = self.vsapi.?.mapGetFloatArray.?(self.in, key.ptr, 0, &err);
const arr_ptr = self.vsapi.?.mapGetFloatArray.?(self.in, key.ptr, &err);
return if (err == .Success) arr_ptr.?[0..n] else null;
} else return null;
}
Expand Down

0 comments on commit 4ea9ded

Please sign in to comment.