Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(template): don't use str[1] to get 1st char #347

Merged
merged 1 commit into from
Jul 13, 2024

Conversation

tmillr
Copy link
Member

@tmillr tmillr commented Jul 13, 2024

In Lua, str[1] on a string always returns nil. Use str:find('^#') instead of str[1] == '#' to check the first byte/char.

@tmillr tmillr force-pushed the fix-template-stridx branch 2 times, most recently from fc833cb to e2cc3fe Compare July 13, 2024 14:57
In Lua, `str[1]` on a string always returns `nil`. Use `str:find('^#')`
instead of `str[1] == '#'` to check the first byte/char.
@tmillr tmillr force-pushed the fix-template-stridx branch from e2cc3fe to 8405245 Compare July 13, 2024 15:07
@tmillr tmillr merged commit e682243 into projekt0n:main Jul 13, 2024
25 checks passed
@tmillr tmillr deleted the fix-template-stridx branch July 13, 2024 15:16
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.

1 participant