Changeset 6eb2e96 in mainline for uspace/app/tetris/scores.c
- Timestamp:
- 2009-04-10T07:53:54Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade
- Children:
- 3cc6a52
- Parents:
- f4b1535
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tetris/scores.c
rf4b1535 r6eb2e96 118 118 static void copyhiscore(int dest, int src) 119 119 { 120 strcpy(scores[dest].hs_name, scores[src].hs_name); 120 str_cpy(scores[dest].hs_name, STR_BOUNDS(MAXLOGNAME) + 1, 121 scores[src].hs_name); 121 122 scores[dest].hs_score = scores[src].hs_score; 122 123 scores[dest].hs_level = scores[src].hs_level; … … 132 133 moveto(10 , 10); 133 134 puts("Insert your name: "); 134 str_ncpy(scores[NUMSPOTS - 1].hs_name, "Player", MAXLOGNAME); 135 str_cpy(scores[NUMSPOTS - 1].hs_name, STR_BOUNDS(MAXLOGNAME) + 1, 136 "Player"); 135 137 i = 6; off = 6; 136 138 … … 196 198 int i; 197 199 for(i = 0; i < NUMSPOTS; i++) { 198 str_ ncpy(scores[i].hs_name, "HelenOS Team", MAXLOGNAME);200 str_cpy(scores[i].hs_name, STR_BOUNDS(MAXLOGNAME) + 1, "HelenOS Team"); 199 201 scores[i].hs_score = (NUMSPOTS - i) * 200; 200 202 scores[i].hs_level = (i + 1 > MAXLEVEL?MAXLEVEL:i + 1);
Note:
See TracChangeset
for help on using the changeset viewer.