Skip to content

Conversation

@drbergman
Copy link
Collaborator

@drbergman drbergman commented Oct 24, 2025

a user recently had this issue where the <colormap> element was empty but the substrate plotting was enabled. This throws a warning when the parsed colormap string is too short (empty or just a single character) and defaults to the YlOrRd colormap that is the default.

It's worth noting that defaulting to YlOrRd already occurs if the colormap string is not recognized. The issue with empty or 1-character colormaps is the check for a _r suffix required checking two characters from the end. So, in short, this makes sure these pathological colormap strings also fall back to the same default.

@MathCancer MathCancer merged commit 01a65c7 into MathCancer:development Dec 10, 2025
104 of 113 checks passed
@drbergman drbergman deleted the safer-substrate-colormap-read branch December 10, 2025 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants