From 161b0c61c287eafdaf11bba18b09e0e2bbb90994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20L=C3=BCthke?= Date: Thu, 31 Aug 2023 15:40:30 +0200 Subject: [PATCH 1/2] Specifically use UInt64 instead of UInt to fix crash on 32-bit platforms --- Sources/MVTTools/VectorTileDecoder.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/MVTTools/VectorTileDecoder.swift b/Sources/MVTTools/VectorTileDecoder.swift index 70fee01..eb407b7 100644 --- a/Sources/MVTTools/VectorTileDecoder.swift +++ b/Sources/MVTTools/VectorTileDecoder.swift @@ -121,7 +121,7 @@ extension VectorTile { return Double(value.floatValue) } else if value.hasUintValue { - return UInt(value.uintValue) + return UInt64(value.uintValue) } else if value.hasSintValue { return Int(value.sintValue) From 5724daabfbed1b0313fb68d8a7cd921f8f5306aa Mon Sep 17 00:00:00 2001 From: jonas Date: Thu, 31 Aug 2023 16:06:49 +0200 Subject: [PATCH 2/2] Specifically use Int64 instead of Int to fix crash on 32-bit platforms --- Sources/MVTTools/VectorTileDecoder.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/MVTTools/VectorTileDecoder.swift b/Sources/MVTTools/VectorTileDecoder.swift index eb407b7..e1f9ce8 100644 --- a/Sources/MVTTools/VectorTileDecoder.swift +++ b/Sources/MVTTools/VectorTileDecoder.swift @@ -109,7 +109,7 @@ extension VectorTile { return string } else if value.hasIntValue { - return Int(value.intValue) + return Int64(value.intValue) } else if value.hasBoolValue { return value.boolValue @@ -124,7 +124,7 @@ extension VectorTile { return UInt64(value.uintValue) } else if value.hasSintValue { - return Int(value.sintValue) + return Int64(value.sintValue) } else { return ""