pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/games/arx-libertatis



Module Name:    pkgsrc
Committed By:   nia
Date:           Sat Sep 13 21:52:04 UTC 2025

Modified Files:
        pkgsrc/games/arx-libertatis: distinfo
Added Files:
        pkgsrc/games/arx-libertatis/patches:
            patch-src_io_resource_PakReader.cpp
            patch-src_io_resource_ResourcePath.cpp

Log Message:
arx-libertatis: Fix ctype usage.

Fixes crash on startup on netbsd-11.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/games/arx-libertatis/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/games/arx-libertatis/patches/patch-src_io_resource_PakReader.cpp \
    pkgsrc/games/arx-libertatis/patches/patch-src_io_resource_ResourcePath.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/games/arx-libertatis/distinfo
diff -u pkgsrc/games/arx-libertatis/distinfo:1.7 pkgsrc/games/arx-libertatis/distinfo:1.8
--- pkgsrc/games/arx-libertatis/distinfo:1.7    Wed Aug 20 19:45:10 2025
+++ pkgsrc/games/arx-libertatis/distinfo        Sat Sep 13 21:52:04 2025
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.7 2025/08/20 19:45:10 triaxx Exp $
+$NetBSD: distinfo,v 1.8 2025/09/13 21:52:04 nia Exp $
 
 BLAKE2s (arx-libertatis-1.2.1.tar.xz) = 6fb018623a637bf9bc2b533b81ef2d3ee3e39d9974bc1a70f72f5abd4e1e2a0f
 SHA512 (arx-libertatis-1.2.1.tar.xz) = 1013b18bb695e99145b44afd012a072cb4f376030301fe4432e503190c45d26f2a4ab0b6ff4ba284bfd10e66007ac8de417f07141e686a56314413c2de35feb4
 Size (arx-libertatis-1.2.1.tar.xz) = 2479764 bytes
 SHA1 (patch-CMakeLists.txt) = 434e1b8becacb2592dff35c6b28ccbdf9cc9311d
 SHA1 (patch-cmake_CompileCheck.cmake) = ca205e24c331f84765bf1bc29e0d7db9213250cc
+SHA1 (patch-src_io_resource_PakReader.cpp) = 48dcb412144920412a558cba59673052fe6e92e6
+SHA1 (patch-src_io_resource_ResourcePath.cpp) = 598e7b189ec2ec272d94e6eda24fe8c729706c97
 SHA1 (patch-src_platform_Thread.cpp) = a1ef75e2e9e9c9981aee992ade0713eecdf538b2

Added files:

Index: pkgsrc/games/arx-libertatis/patches/patch-src_io_resource_PakReader.cpp
diff -u /dev/null pkgsrc/games/arx-libertatis/patches/patch-src_io_resource_PakReader.cpp:1.1
--- /dev/null   Sat Sep 13 21:52:04 2025
+++ pkgsrc/games/arx-libertatis/patches/patch-src_io_resource_PakReader.cpp     Sat Sep 13 21:52:04 2025
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_io_resource_PakReader.cpp,v 1.1 2025/09/13 21:52:04 nia Exp $
+
+Fix ctype usage on invalid ascii sequences.
+
+--- src/io/resource/PakReader.cpp.orig 2025-09-13 21:47:39.414391494 +0000
++++ src/io/resource/PakReader.cpp
+@@ -555,7 +555,9 @@ bool PakReader::addArchive(const fs::pat
+                       }
+                       
+                       size_t len = std::strlen(filename);
+-                      std::transform(filename, filename + len, filename, ::tolower);
++                      for(size_t i = 0; i < len; ++i) {
++                              filename[i] = ::tolower((unsigned char)filename[i]);
++                      }
+                       
+                       u32 offset;
+                       u32 flags;
Index: pkgsrc/games/arx-libertatis/patches/patch-src_io_resource_ResourcePath.cpp
diff -u /dev/null pkgsrc/games/arx-libertatis/patches/patch-src_io_resource_ResourcePath.cpp:1.1
--- /dev/null   Sat Sep 13 21:52:04 2025
+++ pkgsrc/games/arx-libertatis/patches/patch-src_io_resource_ResourcePath.cpp  Sat Sep 13 21:52:04 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_io_resource_ResourcePath.cpp,v 1.1 2025/09/13 21:52:04 nia Exp $
+
+Fix ctype usage on invalid ascii sequences.
+
+--- src/io/resource/ResourcePath.cpp.orig      2025-09-13 21:47:28.611514282 +0000
++++ src/io/resource/ResourcePath.cpp
+@@ -348,7 +348,7 @@ path path::load(const std::string & str)
+               }
+               
+               for(size_t p = start; p < pos; p++) {
+-                      copy[ostart++] = std::tolower(str[p]);
++                      copy[ostart++] = std::tolower((unsigned char)str[p]);
+               }
+               
+       }



Home | Main Index | Thread Index | Old Index