Skip to content
This repository has been archived by the owner on Dec 25, 2023. It is now read-only.

fix: web builder adds null terminator #95

Merged
merged 1 commit into from
Nov 3, 2022
Merged

fix: web builder adds null terminator #95

merged 1 commit into from
Nov 3, 2022

Conversation

brandonpaiz
Copy link
Contributor

In release 1.2, the web UI shows the string "resume" in the web UI. Image: https://i.imgur.com/NbEYPMR.png

This is because

  1. there is no null terminator in the array constructed by src/scripts/build_web_ui.sh
  2. We pass this array directly to a String constructor when the web ui is requested
  3. The String constructor doesn't provide options for array length and expects it to be null terminated.

Easiest solution: have build_web_ui.sh append a null byte

@brandonpaiz brandonpaiz self-assigned this Nov 3, 2022
Copy link
Member

@AlexLynd AlexLynd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goddamn do i hate regex patterns, but this looks good to me!

@brandonpaiz
Copy link
Contributor Author

Some of my favorite bugs come from regex related issues :)

@brandonpaiz brandonpaiz merged commit 171f35b into main Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants