mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-17 00:56:07 +09:00
issue #26: the reason was the dangling pointer?
This commit is contained in:
@@ -13,7 +13,7 @@ internal class UnsafeCvecArray(val width: Int, val height: Int) {
|
||||
|
||||
private inline fun toAddr(x: Int, y: Int) = 16L * (y * width + x)
|
||||
|
||||
fun zerofill() = UnsafeHelper.unsafe.setMemory(this.array.ptr, TOTAL_SIZE_IN_BYTES, 0)
|
||||
fun zerofill() = array.fillWith(0)
|
||||
|
||||
init {
|
||||
zerofill()
|
||||
|
||||
Reference in New Issue
Block a user