summaryrefslogtreecommitdiff
path: root/src/music
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2019-09-29 19:56:59 +0100
committerCharles Pigott <charlespigott@googlemail.com>2019-09-30 14:00:06 +0100
commit3cc6b7f72568e92c8b7280dc1f94f68b52d25724 (patch)
tree4e882429634b140e3d2e19d860df943561186a2e /src/music
parentfe9731d32c554115724275968c7c06655ae024dd (diff)
downloadopenttd-3cc6b7f72568e92c8b7280dc1f94f68b52d25724.tar.xz
Fix: Signedness issue in midi driver
Diffstat (limited to 'src/music')
-rw-r--r--src/music/win32_m.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/music/win32_m.cpp b/src/music/win32_m.cpp
index da26dfb6d..d1ff5375a 100644
--- a/src/music/win32_m.cpp
+++ b/src/music/win32_m.cpp
@@ -369,7 +369,7 @@ const char *MusicDriver_Win32::Start(const char * const *parm)
DEBUG(driver, 2, "Win32-MIDI: Start: initializing");
int resolution = GetDriverParamInt(parm, "resolution", 5);
- int port = GetDriverParamInt(parm, "port", -1);
+ uint port = (uint)GetDriverParamInt(parm, "port", UINT_MAX);
const char *portname = GetDriverParam(parm, "portname");
/* Enumerate ports either for selecting port by name, or for debug output */
@@ -392,7 +392,7 @@ const char *MusicDriver_Win32::Start(const char * const *parm)
}
UINT devid;
- if (port < 0) {
+ if (port == UINT_MAX) {
devid = MIDI_MAPPER;
} else {
devid = (UINT)port;