more system-specific tweaks for windows port (cont.)

This commit is contained in:
Joel Dice 2007-10-24 10:27:59 -06:00
parent 5bfd90cfed
commit f2f453cf75

View File

@ -550,9 +550,9 @@ class MySystem: public System {
HMODULE handle;
unsigned nameLength = (name ? strlen(name) : 0);
if (mapName) {
unsigned size = nameLength + sizeof(SO_SUFFIX);
unsigned size = sizeof(SO_PREFIX) + nameLength + sizeof(SO_SUFFIX);
char buffer[size];
snprintf(buffer, size, "%s" SO_SUFFIX, name);
snprintf(buffer, size, SO_PREFIX "%s" SO_SUFFIX, name);
handle = LoadLibrary(buffer);
} else if (name) {
handle = LoadLibrary(name);