summaryrefslogtreecommitdiff
path: root/src/common/showmsg.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-09 00:46:55 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-09 00:46:55 +0000
commitcc716ca00420c23bdb02831f8fc205d4588e1f75 (patch)
treeb7f3182f6e59f705eff9ee14ad35075fa52acf80 /src/common/showmsg.c
parent4ae1b3c2a335d95a5425ecf5c19c5be2ab21e13a (diff)
downloadhercules-cc716ca00420c23bdb02831f8fc205d4588e1f75.tar.gz
hercules-cc716ca00420c23bdb02831f8fc205d4588e1f75.tar.bz2
hercules-cc716ca00420c23bdb02831f8fc205d4588e1f75.tar.xz
hercules-cc716ca00420c23bdb02831f8fc205d4588e1f75.zip
* Played around with MinGW a bit today...
- adjusted code so that it handles mingw-specific compatibility problems - adjusted the makefile, mingw is not a subset of cygwin * As an experiment Corrected many /W4 warnings on the txt login server git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10192 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/showmsg.c')
-rw-r--r--src/common/showmsg.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/common/showmsg.c b/src/common/showmsg.c
index 58c26ac8a..c61530204 100644
--- a/src/common/showmsg.c
+++ b/src/common/showmsg.c
@@ -27,7 +27,6 @@
#endif
#else
#include <unistd.h>
- #include <ctype.h>
#ifdef DEBUGLOGMAP
#define DEBUGLOGPATH "log/map-server.log"
@@ -400,8 +399,8 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr)
// \033[#;#f - Horizontal & Vertical Position
// The first # specifies the line number, the second # specifies the column.
// The default for both is 1
- info.dwCursorPosition.X = (numbers[numpoint])?(numbers[numpoint]>>4)*10+(numbers[numpoint]&0x0F-1):0;
- info.dwCursorPosition.Y = (numpoint && numbers[numpoint-1])?(numbers[numpoint-1]>>4)*10+(numbers[numpoint-1]&0x0F-1):0;
+ info.dwCursorPosition.X = (numbers[numpoint])?(numbers[numpoint]>>4)*10+((numbers[numpoint]&0x0F)-1):0;
+ info.dwCursorPosition.Y = (numpoint && numbers[numpoint-1])?(numbers[numpoint-1]>>4)*10+((numbers[numpoint-1]&0x0F)-1):0;
if( info.dwCursorPosition.X >= info.dwSize.X ) info.dwCursorPosition.Y = info.dwSize.X-1;
if( info.dwCursorPosition.Y >= info.dwSize.Y ) info.dwCursorPosition.Y = info.dwSize.Y-1;
@@ -480,7 +479,7 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr)
else if( *q == 'G' )
{ // \033[#G - Cursor Horizontal Absolute (CHA)
// Moves the cursor to indicated column in current row.
- info.dwCursorPosition.X = (numbers[numpoint])?(numbers[numpoint]>>4)*10+(numbers[numpoint]&0x0F-1):0;
+ info.dwCursorPosition.X = (numbers[numpoint])?(numbers[numpoint]>>4)*10+((numbers[numpoint]&0x0F)-1):0;
if( info.dwCursorPosition.X >= info.dwSize.X )
info.dwCursorPosition.X = info.dwSize.X-1;