1
0
forked from 0ad/0ad

Fixed assert vs debug_assert.

Noted that the code won't compile unless SDL was compiled with X11
support (which my copy wasn't).

This was SVN commit r4645.
This commit is contained in:
Ykkrosh 2006-11-15 10:33:51 +00:00
parent 4dd04f9bea
commit 3705caae7a
4 changed files with 5 additions and 3 deletions

View File

@ -192,7 +192,7 @@ LibError file_set_root_dir(const char* argv0, const char* rel_path)
// .. append DIR_SEP to simplify code that uses n_root_dir
n_root_dir_len = strlen(n_root_dir)+1; // +1 for trailing DIR_SEP
assert((n_root_dir_len+1) < sizeof(n_root_dir)); // Just checking
debug_assert((n_root_dir_len+1) < sizeof(n_root_dir)); // Just checking
n_root_dir[n_root_dir_len-1] = DIR_SEP;
// You might think that n_root_dir is already 0-terminated, since it's
// static - but that might not be true after calling file_reset_root_dir!

View File

@ -23,4 +23,4 @@ int vsnprintf2(char* buffer, size_t count, const char* format, va_list argptr)
return -1;
return ret;
}
}

View File

@ -217,6 +217,8 @@ int clipboard_filter(const SDL_Event *event)
return 1;
/* Handle window-manager specific clipboard events */
/* (Note: libsdl must be compiled with X11 support (SDL_VIDEO_DRIVER_X11 in SDL_config.h) -
else you'll get errors like "'struct SDL_SysWMmsg' has no member named 'xevent'") */
switch (event->syswm.msg->event.xevent.type) {
/* Copy the selection from our buffer to the requested property, and
convert to the requested target format */

View File

@ -106,4 +106,4 @@ public:
} // else
} // for i
}
};
};