Skip to content

Commit

Permalink
Fix negative decimal value detection in userPrefs (#5963)
Browse files Browse the repository at this point in the history
  • Loading branch information
thebentern authored Jan 30, 2025
1 parent cd8592e commit b5cad2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/platformio-custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def esp32_create_combined_bin(source, target, env):
for pref in userPrefs:
if userPrefs[pref].startswith("{"):
pref_flags.append("-D" + pref + "=" + userPrefs[pref])
elif userPrefs[pref].replace(".", "").isdigit():
elif userPrefs[pref].lstrip("-").replace(".", "").isdigit():
pref_flags.append("-D" + pref + "=" + userPrefs[pref])
elif userPrefs[pref] == "true" or userPrefs[pref] == "false":
pref_flags.append("-D" + pref + "=" + userPrefs[pref])
Expand Down

0 comments on commit b5cad2b

Please sign in to comment.