[Uni-verse] possible maxbug
eskil at obsession.se
eskil at obsession.se
Fri Mar 24 19:28:42 CET 2006
Emil are you listening?
> Nope, it crashes here, but it is small dirty things in the code.
> For example you get a run-time failure check (You use the variable 'drag'
> without initializing it in some file at line 121...) and if you have a
> debugger installed it will break the app.
> This will halt/ throw (asm...3) an exception.
Patch for this:
the lines aroud 83 in v_cmd_def_o.c:
"\t\tif((mask & pow) != 0)\n"
"\t\t\tbuffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &drag);\n"
"\t\tif(func_o_transform_pos_real32 != NULL)\n"
should be:
"\t\tif((mask & pow) != 0)\n"
"\t\t\tbuffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &drag);\n"
"\t\telse\n"
"\t\t\tdrag = 0.0;\n"
"\t\tif(func_o_transform_pos_real32 != NULL)\n"
the lines aroud 229 in the same file:
"\t\tif((mask & pow) != 0)\n"
"\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &drag);\n"
"\t\tif(func_o_transform_pos_real64 != NULL)\n"
should be:
"\t\tif((mask & pow) != 0)\n"
"\t\t\tbuffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &drag);\n"
"\t\telse\n"
"\t\t\tdrag = 0.0;\n"
"\t\tif(func_o_transform_pos_real64 != NULL)\n"
then regenerate all commands or patch in v_gen_pack_o_node.c:
if((mask & pow) != 0)
buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &drag);
if(func_o_transform_pos_real32 != NULL)
to:
if((mask & pow) != 0)
buffer_pos += vnp_raw_unpack_real32(&buf[buffer_pos], &drag);
else
drag = 0.0;
if(func_o_transform_pos_real32 != NULL)
and:
if((mask & pow) != 0)
buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &drag);
if(func_o_transform_pos_real64 != NULL)
to:
if((mask & pow) != 0)
buffer_pos += vnp_raw_unpack_real64(&buf[buffer_pos], &drag);
else
drag = 0.0;
if(func_o_transform_pos_real64 != NULL)
cheers
E
More information about the Uni-verse
mailing list