summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-18 00:16:13 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-18 00:16:13 +0800
commitde1db06299491eb2354ae7fb032b5ee904ee66de (patch)
treefd407d5f06a62621f5960a563d93cdac8d95eade
parent5f1b1f41ba2043cc6c744d7acc877396f525e296 (diff)
downloadpttbbs-de1db06299491eb2354ae7fb032b5ee904ee66de.tar
pttbbs-de1db06299491eb2354ae7fb032b5ee904ee66de.tar.gz
pttbbs-de1db06299491eb2354ae7fb032b5ee904ee66de.tar.bz2
pttbbs-de1db06299491eb2354ae7fb032b5ee904ee66de.tar.lz
pttbbs-de1db06299491eb2354ae7fb032b5ee904ee66de.tar.xz
pttbbs-de1db06299491eb2354ae7fb032b5ee904ee66de.tar.zst
pttbbs-de1db06299491eb2354ae7fb032b5ee904ee66de.zip
- bbslua: fix bbs.kball() on w32 port
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3840 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/bbslua.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/mbbsd/bbslua.c b/mbbsd/bbslua.c
index d22e0b4d..cef1e2c3 100644
--- a/mbbsd/bbslua.c
+++ b/mbbsd/bbslua.c
@@ -494,11 +494,17 @@ bl_kball(lua_State *L)
if (abortBBSLua)
return r;
+#ifdef _WIN32
+ while (peekch(0))
+ {
+ bl_k2s(L, igetch());
+ i++;
+ }
+#else
// next, collect all input and return.
if (num_in_buf() < 1)
return 0;
- lua_newtable(L);
oldr = num_in_buf() +1;
i = 0;
@@ -508,6 +514,8 @@ bl_kball(lua_State *L)
bl_k2s(L, igetch());
i++;
}
+#endif
+
return i;
}