Update upstream source from tag 'upstream/0.1.3'

Update to upstream version '0.1.3'
with Debian dir 98605e57e3
This commit is contained in:
alan (NyxTrail) 2024-06-18 14:35:51 +00:00
commit 1495e96619
4 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.19)
set(HYPRUTILS_VERSION "0.1.2")
set(HYPRUTILS_VERSION "0.1.3")
add_compile_definitions(HYPRUTILS_VERSION="${HYPRUTILS_VERSION}")
project(hyprutils

View File

@ -14,6 +14,10 @@ stdenv.mkDerivation {
outputs = ["out" "dev"];
cmakeBuildType = "RelWithDebInfo";
dontStrip = true;
meta = with lib; {
homepage = "https://github.com/hyprwm/hyprutils";
description = "Small C++ library for utilities used across the Hypr* ecosystem";

View File

@ -51,7 +51,7 @@ bool Hyprutils::String::isNumber(const std::string& str, bool allowfloat) {
}
}
if (str.back() == '.')
if (!isdigit(str.back()))
return false;
return true;

View File

@ -19,6 +19,7 @@ int main(int argc, char** argv, char** envp) {
EXPECT(isNumber("---3423--432s"), false);
EXPECT(isNumber("1s"), false);
EXPECT(isNumber(""), false);
EXPECT(isNumber("-"), false);
EXPECT(isNumber("--0"), false);
EXPECT(isNumber("abc"), false);
EXPECT(isNumber("0.0", true), true);