Page 1 of 1

Minor fatal error in "src/physfs.c" (patch included)

Posted: Thu Aug 30, 2012 7:30 am
by leycec
File "src/physfs.c" in beta42 erroneously calls free() without first including <stdlib.h>. The attached patch trivially corrects this. *tsk, tsk* :D

Err... "The extension patch is not allowed." (Neither was ".diff".) Alright, then. The raw patch for your darkling pleasure:

Code: Select all

Calling free() requires including "stdlib.h". Failure to do so causes:
	../src/physfs.c:312:2: warning: incompatible implicit declaration of built-in function ‘free’

--- src/physfs.c	2012-08-30 02:19:29.136840522 -0500
+++ src/physfs.c.new	2012-08-30 02:35:51.483368621 -0500
@@ -18,6 +18,7 @@
     Nicolas Casalini "DarkGod"
     darkgod@te4.org
 */
+#include <stdlib.h>
 #include <string.h>
 #include "lua.h"
 #include "lauxlib.h"
Incidentally, beta42 appears to be highly unstable on both OS X and Linux. Like numerous other posters, I'm hitting an undead slew of:

Code: Select all

<--SNIP-->
player	1	dumb ai talents can use	Manathrust	T_MANATHRUST
player	1	dumb ai talents can use	Fireflash	T_FIREFLASH
dumb ai uses	T_MANATHRUST
player	1	dumb ai talents can use	Flame	T_FLAME
player	1	dumb ai talents can use	Fireflash	T_FIREFLASH
dumb ai uses	T_FLAME
player	1	dumb ai talents can use	Lightning	T_LIGHTNING
player	1	dumb ai talents can use	Flame	T_FLAME
player	1	dumb ai talents can use	Sunshield	T_SUNSHIELD
player	1	dumb ai talents can use	Flameshock	T_FLAMESHOCK
player	1	dumb ai talents can use	Manathrust	T_MANATHRUST
player	1	dumb ai talents can use	Fireflash	T_FIREFLASH
dumb ai uses	T_FLAMESHOCK
player	1	dumb ai talents can use	Lightning	T_LIGHTNING
player	1	dumb ai talents can use	Flame	T_FLAME
player	1	dumb ai talents can use	Sunshield	T_SUNSHIELD
player	1	dumb ai talents can use	Manathrust	T_MANATHRUST
player	1	dumb ai talents can use	Fireflash	T_FIREFLASH
dumb ai uses	T_FIREFLASH
Adding entity	791	after	1
Particle emitter error 15b0790 (2): attempt to call a nil value
Particle emitter error 15b0790 (2): attempt to call a nil value
Particle emitter error 15b0790 (2): attempt to call a nil value
Particle emitter error 15b0790 (2): attempt to call a nil value
Particle emitter error 15b0790 (2): attempt to call a nil value
Particle emitter error 15b0790 (2): attempt to call a nil value
Particle emitter error 15b0790 (2): attempt to call a nil value
Particle emitter error 15b0790 (2): attempt to call a nil value
PANIC: unprotected error in call to Lua API (attempt to call a nil value)
Anyone happen to know the last stable beta not receiving such errors (ideally, under Linux)? In the meanwhile, I'll eat my way down the beta food chain until stumbling onto a stable codebase. "To beta41, and beyond!"

Re: Minor fatal error in "src/physfs.c" (patch included)

Posted: Thu Nov 22, 2012 5:43 pm
by darkgod
fixed
fixed