Changeset c354a08 in mainline for uspace/app/tetris/scores.c


Ignore:
Timestamp:
2015-09-18T14:40:29Z (9 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8a45707d
Parents:
9308dba
Message:

do not crash if score file cannot be created

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tetris/scores.c

    r9308dba rc354a08  
    233233
    234234        f = fopen("/data/tetris.sco", "wb");
     235        if (f == NULL) {
     236                printf("Error creating table\n");
     237                return;
     238        }
     239       
    235240        cnt = fwrite(scores, sizeof(struct highscore), NUMSPOTS, f);
    236241        rc = fclose(f);
Note: See TracChangeset for help on using the changeset viewer.