summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-27 13:53:09 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-27 13:53:09 +0800
commit22c73f4ffcbda6e6ea75dc798a65e145bce71f69 (patch)
tree80f03861e913de373dd822e252553d229fb98c79
parent6a6418fbb4af016da8a957a42942bf90d3f27fbb (diff)
downloadpttbbs-22c73f4ffcbda6e6ea75dc798a65e145bce71f69.tar
pttbbs-22c73f4ffcbda6e6ea75dc798a65e145bce71f69.tar.gz
pttbbs-22c73f4ffcbda6e6ea75dc798a65e145bce71f69.tar.bz2
pttbbs-22c73f4ffcbda6e6ea75dc798a65e145bce71f69.tar.lz
pttbbs-22c73f4ffcbda6e6ea75dc798a65e145bce71f69.tar.xz
pttbbs-22c73f4ffcbda6e6ea75dc798a65e145bce71f69.tar.zst
pttbbs-22c73f4ffcbda6e6ea75dc798a65e145bce71f69.zip
fix last commit bug
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@731 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/board.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/pttbbs/mbbsd/board.c b/pttbbs/mbbsd/board.c
index b61854fa..36421670 100644
--- a/pttbbs/mbbsd/board.c
+++ b/pttbbs/mbbsd/board.c
@@ -1,4 +1,4 @@
-/* $Id: board.c,v 1.104 2003/03/27 05:44:42 in2 Exp $ */
+/* $Id: board.c,v 1.105 2003/03/27 05:53:09 in2 Exp $ */
#include "bbs.h"
#define BRC_STRLEN 15 /* Length of board name */
#define BRC_MAXSIZE 24576
@@ -706,7 +706,7 @@ static void
load_boards(char *key)
{
boardheader_t *bptr = NULL;
- int type = cuser.uflag & BRDSORT_FLAG ? 1 : 0;
+ int type = (cuser.uflag & BRDSORT_FLAG) ? 0 : 1;
int i, n;
int state;
#ifdef CRITICAL_MEMORY
@@ -1167,12 +1167,16 @@ choose_board(int newflag)
getdata(b_lines - 1, 0,
"排序方式 (1)按照板名排序 (2)按照類別排序 ==> [0]取消 ",
input, sizeof(input), DOECHO);
- if( input[0] == '1' )
+ if( input[0] == '1' ){
+ cuser.uflag |= BRDSORT_FLAG;
qsort(&fav->b, fav->nDatas, sizeof(fav_board_t),
favcmpboardname);
- else if( input[0] == '2' )
+ }
+ else if( input[0] == '2' ){
+ cuser.uflag &= ~BRDSORT_FLAG;
qsort(&fav->b, fav->nDatas, sizeof(fav_board_t),
favcmpboardclass);
+ }
}
brdnum = -1;
break;