Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002386Zandronum[All Projects] Bugpublic2015-08-09 16:262018-09-30 22:19
ReporterIvan 
Assigned ToEdward-san 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.1 
Target Version2.1Fixed in Version3.0 
Summary0002386: Item amounts sent in 2 bytes instead of 4
DescriptionFrom a conversation with Dusk on irc (link:'http://hastebin.com/loweniture.xml [^]')

An image to demonstrate the problem:'http://i.imgur.com/VxmHIfU.png [^]'

The credit actor has a inventory.maxamount property of 0x7FFFFFFF and right after the 5th digit, there is an overflow. Which makes sense as signed short max is 32767 and it has 5 digits.
Attached Files

- Relationships

-  Notes
User avatar (0013162)
Ivan (reporter)
2015-08-09 17:02
edited on: 2015-08-09 17:45

Additional Info:'https://www.dropbox.com/s/hoqqfibtfyd3xj7/bytetest.pk3?dl=0 [^]' | Download this example file. I've managed to isolate the problem. Follow these steps:

1) Try to give yourself "creditgiver" in console, you'll see it'll give the item properly and there will be no overflow.

2) Summon "zombieman2", kill it, it gives 32760 credit. Summon another, kill it, overflow.

3) Additionally, there's also a problem with taking inventories online. Simply change the A_GiveToTarget to A_TakeFromTarget, and try again.

User avatar (0013164)
Edward-san (developer)
2015-08-09 17:42

'https://bitbucket.org/crimsondusk/zandronum-sandbox-stable/commits/fcd5e521635df68450de09b75cd4bf8a62f083a5 [^]' should fix the issue, with both inventory giving and taking.
User avatar (0013166)
WaTaKiD (updater)
2015-08-09 17:49
edited on: 2015-08-09 17:49

'https://www.dropbox.com/s/sq8k1j8ezobhoep/zandronum-2.2-r150809-1741-fcd5e52-windows.zip?dl=0 [^]' contains the above commit, please test

User avatar (0013167)
Ivan (reporter)
2015-08-09 18:17

Works properly.
User avatar (0013175)
Torr Samaho (administrator)
2015-08-09 20:13

Since the fix is for the stable branch, can I assume this is not a 3.0 only issue?
User avatar (0013177)
Edward-san (developer)
2015-08-09 21:42

Uh yeah. Fixed the version.
User avatar (0013236)
Torr Samaho (administrator)
2015-08-19 19:06

I added your patch.
User avatar (0013237)
cobalt (updater)
2015-08-19 19:07

Issue addressed by commit ccd429c7c8fd: - Fixed: the server did not handle item givings and takings with amounts greater than 32767 (addresses 2386).
Committed by Edoardo Prezioso [edward-san] on Sunday 09 August 2015 19:41:10

Changes in files:

 docs/zandronum-history.txt | 1 +
 src/cl_main.cpp | 4 ++--
 src/sv_commands.cpp | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

User avatar (0013503)
Ru5tK1ng (updater)
2015-09-12 23:57

I followed the steps as indicated by Ivan and I was able to reach over 1 million credits without issue by simply killing zombies. I tested out a_takefromtarget and my credits went down properly and didn't go past zero or bug out. All is good it seems.

Tested online with 3.0-alpha-150819-235.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2015-08-09 16:26 Ivan New Issue
2015-08-09 17:02 Ivan Note Added: 0013162
2015-08-09 17:42 Edward-san Note Added: 0013164
2015-08-09 17:43 Edward-san Assigned To => Edward-san
2015-08-09 17:43 Edward-san Status new => feedback
2015-08-09 17:43 Ivan Note Added: 0013165
2015-08-09 17:43 Ivan Status feedback => assigned
2015-08-09 17:44 Edward-san Status assigned => feedback
2015-08-09 17:44 Ivan Note Deleted: 0013165
2015-08-09 17:45 Ivan Note Edited: 0013162 View Revisions
2015-08-09 17:49 WaTaKiD Note Added: 0013166
2015-08-09 17:49 WaTaKiD Note Edited: 0013166 View Revisions
2015-08-09 18:17 Ivan Note Added: 0013167
2015-08-09 18:17 Ivan Status feedback => assigned
2015-08-09 19:07 Edward-san Status assigned => needs review
2015-08-09 20:13 Torr Samaho Note Added: 0013175
2015-08-09 21:42 Edward-san Note Added: 0013177
2015-08-09 21:42 Edward-san Product Version 3.0-beta => 2.1
2015-08-19 19:06 Torr Samaho Note Added: 0013236
2015-08-19 19:06 Torr Samaho Status needs review => needs testing
2015-08-19 19:07 cobalt Target Version => 2.1
2015-08-19 19:07 cobalt Description Updated View Revisions
2015-08-19 19:07 cobalt Note Added: 0013237
2015-09-12 23:57 Ru5tK1ng Note Added: 0013503
2015-09-14 23:20 Dusk Status needs testing => resolved
2015-09-14 23:20 Dusk Fixed in Version => 3.0
2015-09-14 23:20 Dusk Resolution open => fixed
2018-09-30 22:19 Blzut3 Status resolved => closed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker