mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
Merge pull request #548 from pzychotic/fix-errors
Fix small collection of errors
This commit is contained in:
commit
dfc192ac81
@ -1096,7 +1096,7 @@ int CheckTransparentPoint(const vector *pnt, const room *rp, const int facenum)
|
||||
|
||||
// Computes a bounding sphere for the current room
|
||||
// Parameters: center - filled in with the center point of the sphere
|
||||
// rp - the room we’re bounding
|
||||
// rp - the room we're bounding
|
||||
// Returns: the radius of the bounding sphere
|
||||
float ComputeRoomBoundingSphere(vector *center, room *rp) {
|
||||
// This algorithm is from Graphics Gems I. There's a better algorithm in Graphics Gems III that
|
||||
|
@ -191,7 +191,7 @@ void ddgr_FatalError(const char *fmt, ...) {
|
||||
std::vsnprintf(buf, 768, fmt, arglist);
|
||||
va_end(arglist);
|
||||
|
||||
if (DDGR_subsystems[i] = !-1) {
|
||||
if (DDGR_subsystems[i] != -1) {
|
||||
strcat(buf, "\n\nSubsystem: ");
|
||||
strcat(buf, DDGR_subsystem_names[i]);
|
||||
}
|
||||
|
@ -174,6 +174,6 @@ void con_raw_Destroy() {
|
||||
|
||||
// put some data up on the screen
|
||||
void con_raw_Puts(int window, const char *str) {
|
||||
fprintf(stdout, str, strlen(str));
|
||||
fprintf(stdout, str);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
@ -214,8 +214,10 @@ MenuItem::MenuItem(const char *title, char type, uint8_t flags, void (*fp)(int),
|
||||
m_iState = va_arg(marker, int);
|
||||
if ((SubMenuCount > 0) && (SubMenuCount < MAX_STATE_SUBMENUS)) {
|
||||
SubMenus = (IMenuItem **)malloc(sizeof(IMenuItem *) * SubMenuCount);
|
||||
if (!SubMenus)
|
||||
if (!SubMenus) {
|
||||
va_end(marker);
|
||||
return;
|
||||
}
|
||||
char *string;
|
||||
for (int i = 0; i < SubMenuCount; i++) {
|
||||
string = va_arg(marker, char *);
|
||||
@ -873,8 +875,10 @@ bool MenuItem::SetStateItemList(int count, ...) {
|
||||
|
||||
if ((SubMenuCount > 0) && (SubMenuCount < MAX_STATE_SUBMENUS)) {
|
||||
SubMenus = (IMenuItem **)malloc(sizeof(IMenuItem *) * SubMenuCount);
|
||||
if (!SubMenus)
|
||||
if (!SubMenus) {
|
||||
va_end(marker);
|
||||
return false;
|
||||
}
|
||||
char *string;
|
||||
for (int i = 0; i < SubMenuCount; i++) {
|
||||
string = va_arg(marker, char *);
|
||||
|
Loading…
Reference in New Issue
Block a user