********>Bugfix 25
Author: Scott Brozell, reported by Steven Winfield
Date: 12/11/2006
Programs: LEaP
Description: The setbox command ignores its third argument.
Fix: apply the following patch to src/leap/src/leap/commands.c
------------------------------------------------------------------------------
*** commands.c 2006/04/03 23:35:27 9.0
--- commands.c 2006/12/12 04:43:42
***************
*** 2808,2826 ****
* get any box offset
*/
if ( iArgCount == 3 ) {
! if ( iObjectType( oAssocObject(aaArgs[1]) ) == LISTid ) {
LISTLOOP llNumbers;
/*
* x,y,z box clearances
*/
! if ( iListSize(oAssocObject(aaArgs[1])) != 3 ) {
VP0(( "%s: Argument #2 must have three values: { x y z } or one.\n",
sCmd ));
VP0(( sUsage ));
return(NULL);
}
! llNumbers = llListLoop((LIST)oAssocObject(aaArgs[1]));
for ( i=0; i<3; i++ ) {
ASSOC aAss = (ASSOC)oListNext(&llNumbers);
if ( iObjectType(oAssocObject(aAss)) != ODOUBLEid ) {
--- 2808,2826 ----
* get any box offset
*/
if ( iArgCount == 3 ) {
! if ( iObjectType( oAssocObject(aaArgs[2]) ) == LISTid ) {
LISTLOOP llNumbers;
/*
* x,y,z box clearances
*/
! if ( iListSize(oAssocObject(aaArgs[2])) != 3 ) {
VP0(( "%s: Argument #2 must have three values: { x y z } or one.\n",
sCmd ));
VP0(( sUsage ));
return(NULL);
}
! llNumbers = llListLoop((LIST)oAssocObject(aaArgs[2]));
for ( i=0; i<3; i++ ) {
ASSOC aAss = (ASSOC)oListNext(&llNumbers);
if ( iObjectType(oAssocObject(aAss)) != ODOUBLEid ) {
***************
*** 2836,2842 ****
}
}
} else {
! daBuffer[0] = 2.0 * dODouble(oAssocObject(aaArgs[1]));
if ( daBuffer[0] < 0.0 ) {
VP0(( "%s: Bad box clearance.\n", sCmd ));
VP0(( sUsage ));
--- 2836,2842 ----
}
}
} else {
! daBuffer[0] = 2.0 * dODouble(oAssocObject(aaArgs[2]));
if ( daBuffer[0] < 0.0 ) {
VP0(( "%s: Bad box clearance.\n", sCmd ));
VP0(( sUsage ));
------------------------------------------------------------------------------
Temporary workarounds: none