DaleStan wrote:PhilSophus wrote:So, have the days of DOS with 8.3 filenames

Except that they haven't. DOS TTDPatch cannot read GRF files that longer than 8+3. Adding "_win" to the DOS version gives 12+3 -- 16 characters.
Okay, I forgot about the original game being (also) DOS.
So, do I get you right that it's just "luck" that it doesn't crash between 16 and 24 characters, because it just overwrites "unimportant" stuff?
DaleStan wrote:
If you submit a patch, I'll commit it, but it's not worth my time to fix grfcodec. I like having all my GRF files match at least one of the (DOS wildcard) patterns "????????w.grf" and "????????.grf".
I might do so at some time, but it's quite low on a long (Open)TTD(Patch) todo list (until this item it was an OpenTTD todo list

).
DaleStan wrote:
You might convince me to make GRFCodec refuse to touch over-length filenames, though.
IMHO, it would indeed be a good quick fix if it just refused filenames above the limit with an error message. It took me quite some time to find out what the problem was as I, as an NFO novice, assumed there was something wrong with my NFO (despite renum accepting it). I already had a post with my NFO code ready, when pasting the command line and looking at the gdb stack trace again I got the impression that the problem occured before actually reading the file.
As FooBar said even mentioning it as "known issue" in the documentation would help a lot (In that case may I also suggest to rename grfcodec.txt to README or README.txt or putting the txt files into a doc subdirectory? I only found it by accident after having posted), though I think checking the length of a parameter before copying around should not be that much work, either. A good compromise would be to mention it in the built-in help. For most other options it mentions limits and a relatively short filename limit is not exactly what you would expect.
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008