Skip to content

Commit 43c7500

Browse files
author
Ivan Dlugos
committed
memset fallback - let's be more generic and actually fill with the given value instead of zeroes
1 parent 7c9365f commit 43c7500

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

objectbox/lib/src/native/bindings/flatbuffers.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class Allocator extends fb.Allocator {
109109
} catch (_) {
110110
// fall back if we can't load a native memset()
111111
fbMemset = (Pointer<Uint8> ptr, int byte, int size) =>
112-
ptr.cast<Uint8>().asTypedList(size).fillRange(0, size, 0);
112+
ptr.cast<Uint8>().asTypedList(size).fillRange(0, size, byte);
113113
}
114114
} else {
115115
fbMemset = DynamicLibrary.process()

0 commit comments

Comments
 (0)