SphereServer BugTracker - SphereServer
View Issue Details
0002238SphereServerexecutable - linux buildpublic05-11-13 00:1309-11-13 16:55
Awaken 
Ben 
normalminoralways
resolvedfixed 
LinuxDebianDebian 7 32Bits
 
0.56c Nightly 
Automated (specify build number)
New_Triggers, WalkCheck, Size_Optimise, DamageTools
Command_Sysmsgs, FileCommands, NoItemNaming, NoHouseMuteSpeech, Buffs, NoPrefix
0002238: Different return in Windows and Linux
[TYPEDEF t_armor_leather]
ON=@Equip
IF <LAYER>==4
   SRC.MODAR += <muldiv <dArmor>,5,100>
ENDIF

Armor: Leather armor with 37 armors.

The Result in WIndows is 2 but in Linux is 1.

5% of 37 is 1.85 (2)
No tags attached.
Issue History
05-11-13 00:13AwakenNew Issue
05-11-13 22:22darksun84Note Added: 0001758
09-11-13 16:55BenNote Added: 0001761
09-11-13 16:55BenStatusnew => resolved
09-11-13 16:55BenFixed in Version => 0.56c Nightly
09-11-13 16:55BenResolutionopen => fixed
09-11-13 16:55BenAssigned To => Ben

Notes
(0001758)
darksun84   
05-11-13 22:22   
I don't think it's a bug, the "rounding method" could be different from a compiler to another, so maybe the compiler used for the windows build rounds down while the linux one rounds up !
(0001761)
Ben   
09-11-13 16:55   
Dark is right on this, both systems use a different methode for Muldiv().
I replaced it with a custom function which will round the number properly, so this should be consistent on both systems