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

[Bug] Unix style LF newlines are not parsed correctly #673

Open
Inconn opened this issue Jun 1, 2024 · 2 comments · May be fixed by #674
Open

[Bug] Unix style LF newlines are not parsed correctly #673

Inconn opened this issue Jun 1, 2024 · 2 comments · May be fixed by #674
Assignees
Labels

Comments

@Inconn
Copy link

Inconn commented Jun 1, 2024

Describe the bug
When map files use Unix-style LF (\n) newlines instead of DOS-style CRLF (\r\n) newlines, they are not parsed correctly

To Reproduce
Steps to reproduce the behavior:

  1. Download https://ksm.dev/songs/68bc72a0-17e4-11ef-aeb9-476d797c94d2 (happens with any song that has LF newlines, but this one already has them, so it's broken on download)
  2. Notice that it is definitely not parsed correctly in the menu, and that trying to play it does not work at all

Expected behavior
Map files should be parsed correctly regardless of whether they use CRLF newlines or LF newlines, or at least automatically converted to CRLF newlines if they are using LF newlines.

Screenshots
When the files are using Unix-style LF newlines:
image
After converting the files to use DOS-style CRLF newlines
image

Desktop (please complete the following information):

  • OS: Arch Linux (using CachyOS)
  • GPU: NVIDIA RTX 3070
  • CPU: AMD Ryzen 7900X
  • Version: 2024-02-25_f264d380

I was also able to replicate this faulty behavior by converting a known good file to Unix-style LF newlines using dos2unix

@Inconn Inconn added the bug label Jun 1, 2024
@Inconn
Copy link
Author

Inconn commented Jun 1, 2024

Was able to fix this very easily by changing the occurances of "\r\n" to "\n" in https://github.com/Drewol/unnamed-sdvx-clone/blob/develop/Beatmap/src/KShootMap.cpp but idk if you want to come up with a better solution or something

@Inconn
Copy link
Author

Inconn commented Jun 1, 2024

nevermind doing that breaks all songs that use \r\n breaks

I'm assuming it leaves a loose "\r" at the end of the lines when you do that and that messes things up

@Inconn Inconn linked a pull request Jun 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants