Skip to content

Commit b5cad2b

Browse files
authored
Fix negative decimal value detection in userPrefs (meshtastic#5963)
1 parent cd8592e commit b5cad2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/platformio-custom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def esp32_create_combined_bin(source, target, env):
102102
for pref in userPrefs:
103103
if userPrefs[pref].startswith("{"):
104104
pref_flags.append("-D" + pref + "=" + userPrefs[pref])
105-
elif userPrefs[pref].replace(".", "").isdigit():
105+
elif userPrefs[pref].lstrip("-").replace(".", "").isdigit():
106106
pref_flags.append("-D" + pref + "=" + userPrefs[pref])
107107
elif userPrefs[pref] == "true" or userPrefs[pref] == "false":
108108
pref_flags.append("-D" + pref + "=" + userPrefs[pref])

0 commit comments

Comments
 (0)