X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=fishladder.c;h=68f04febd75e54bd42da4c043bf3d956d0503caf;hb=17d104181ae9f3b9cb16dab5ba3164d2f469233d;hp=e7cd191add03093edde65cec9982454be901e139;hpb=18aa936b41a102700b6fc9fc9f0ac49712a0fced;p=fishladder.git diff --git a/fishladder.c b/fishladder.c index e7cd191..68f04fe 100644 --- a/fishladder.c +++ b/fishladder.c @@ -314,15 +314,21 @@ static int map_load( const char *str, const char *name ) if( !*c ) break; + if( *c == '\r' ) { c ++; continue; } // fuck off windows + if( *c == ';' ) { c ++; - + + if( *c == '\r' ) c ++; + // Parse attribs if( *c != '\n' ) { while( *c ) { + if( *c == '\r' ) { c ++; continue; } + if( reg_start < reg_end ) { struct cell_terminal *terminal = &world.io[ reg_start ]; @@ -736,12 +742,12 @@ static int console_changelevel( int argc, char const *argv[] ) if( argc >= 1 ) { // Save current level - if( console_save_map( 0, NULL ) ) - if( console_load_map( argc, argv ) ) - { - simulation_stop(); - return 1; - } + console_save_map( 0, NULL ); + if( console_load_map( argc, argv ) ) + { + simulation_stop(); + return 1; + } } else {