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

Mod dependency list has bad line breaks if file has Windows line-breaks on unixoid system #4720

Wuzzy2 opened this issue Nov 3, 2016 · 1 comment
Bug Issues that were confirmed to be a bug @ Client / Audiovisuals


Copy link

Wuzzy2 commented Nov 3, 2016

Minetest may screw up the list of mod dependencies in the main menu if the line endings of depends.txt are in “Windows” mode and Minetest runs on Linux (my system):

Dependencies Windows mode

The text seems to be a “half line” too high. The file was stored with “Windows” line endings. If I convert depends.txt to “UNIX” mode, Minetest shows it correctly:

Dependencies in UNIX mode

The source depends.txt file used for this example:


(No line-break at the final line, but it makes no difference.)

Tested in 70e2df4.

My guess:
So the bug here seems to be that Minetest expects depends.txt to have “UNIX”-style line endings because I am on Linux. Ideally, Minetest should be able to deal with all 3 possible line ending types (Windows, UNIX, Mac) correctly on any system.

@est31 est31 added Bug Issues that were confirmed to be a bug @ Client / Audiovisuals labels Nov 3, 2016
bernardosulzbach pushed a commit to bernardosulzbach/minetest that referenced this issue Dec 12, 2016
This fixes a bug existing in modmgr.lua as reported by @Wuzzy2 which
caused the mod dependency list to glitch if input was using a line
terminator different than the OS default.

The C++ code does not need any changes as it already trims CR
occurrences on platforms on which the line termination sequence is LF.

Taken into account the size of the depends.txt files used, this should
not introduce a noticeable performance regression.

Fixes minetest#4720
Copy link

paramat commented Dec 12, 2016

#4896 merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Bug Issues that were confirmed to be a bug @ Client / Audiovisuals
None yet

Successfully merging a pull request may close this issue.

3 participants