-rw-r--r-- | noncore/games/kpacman/score.cpp | 4 | ||||
-rw-r--r-- | noncore/todayplugins/stockticker/libstocks/http.c | 19 |
2 files changed, 11 insertions, 12 deletions
diff --git a/noncore/games/kpacman/score.cpp b/noncore/games/kpacman/score.cpp index 6878b81..737f03b 100644 --- a/noncore/games/kpacman/score.cpp +++ b/noncore/games/kpacman/score.cpp @@ -241,3 +241,3 @@ void Score::keyPressEvent(QKeyEvent *k) if (x != cursor.x || y != cursor.y) { - if (cursor.x != -1) + if (cursor.x != -1 && lastScore >= 0) cursor.chr = hallOfFame[lastScore].name.at(cursor.x-14); @@ -245,3 +245,3 @@ void Score::keyPressEvent(QKeyEvent *k) repaint(rect(x, y*1.25, cursor.chr), FALSE); - } else + } else if (lastScore >= 0) hallOfFame[lastScore].name.at(cursor.x-14) = cursor.chr; diff --git a/noncore/todayplugins/stockticker/libstocks/http.c b/noncore/todayplugins/stockticker/libstocks/http.c index cc78ab7..155ce4b 100644 --- a/noncore/todayplugins/stockticker/libstocks/http.c +++ b/noncore/todayplugins/stockticker/libstocks/http.c @@ -86,5 +86,5 @@ libstocks_return_code http_get(char *http_file, char *http_server, char **pdata) - } else + } + else { - #ifdef DEBUG @@ -98,3 +98,2 @@ libstocks_return_code http_get(char *http_file, char *http_server, char **pdata) { - #ifdef DEBUG @@ -161,3 +160,3 @@ libstocks_return_code http_get(char *http_file, char *http_server, char **pdata) - if (r) + if (r > 0) { @@ -167,4 +166,4 @@ libstocks_return_code http_get(char *http_file, char *http_server, char **pdata) { - fprintf(stderr,"Memory allocating error (%s line %d)\n" - ,__FILE__, __LINE__); + fprintf(stderr,"Memory allocating error (%s line %d)\n", + __FILE__, __LINE__); exit(1); @@ -180,4 +179,4 @@ libstocks_return_code http_get(char *http_file, char *http_server, char **pdata) { - fprintf(stderr,"Memory allocating error (%s line %d)\n" - ,__FILE__, __LINE__); + fprintf(stderr,"Memory allocating error (%s line %d)\n", + __FILE__, __LINE__); exit(1); @@ -242,4 +241,4 @@ libstocks_return_code http_get(char *http_file, char *http_server, char **pdata) free(data); - fprintf(stderr,"Memory allocating error (%s line %d)\n" - ,__FILE__, __LINE__); + fprintf(stderr,"Memory allocating error (%s line %d)\n", + __FILE__, __LINE__); exit(1); |