Invalid color file format freezes planet

Invalid color file format freezes planet

Return to topic list

Thu Aug 15 16:31:17 2024   by   Mizuki
Simply add a letter to anywhere in Olsson.col so it's no longer valid, and planet will freeze.
Maybe it's better to add code to check if color files only have numbers in the correct format, like you did in biomes file?
 
Thu Aug 15 17:20:12 2024   by   Mizuki
I have an idea: replace if (result < 0) with if (result == 4 || result == EOF), then add an else printf error.
 
Thu Aug 15 17:53:36 2024   by   Mizuki
And we can check if the values itself are valid with if (rValue > 255 || rValue < 0 || gValue > 255 || gValue < 0 || bValue > 255 || bValue > 0), but it looks pretty unwieldy...
 

Return to topic list



New message:
Topic:
Posted by:

Type the values of the dice shown below:

Return to topic list