Project

General

Profile

Bug #3960

Clothes with high cost (> 32768) are not handled properly

Added by Andrei Kortunov 2 months ago. Updated 12 days ago.

Status:
Closed
Priority:
Normal
Category:
General
Target version:
Start date:
07/18/2017
% Done:

100%

Reproducibility:
Always
Operating system:
Linux
Severity:
Normal

Description

To reproduce this bug just set a cost of any item in editor to 40000 and check this item in-game.
The item will have a negative cost due to overflow and you can buy/sell it for 1 coin.
An original game can handle cost up to 65535.
We should change a cost field type from short to unsigned short.

Associated revisions

Revision 2bd105f5 (diff)
Added by Andrei Kortunov 2 months ago

Change mValue type for clothes to unsigned short (fixes #3960)

Revision ffb6dff6
Added by scrawl . 2 months ago

Merge pull request #1338 from akortunov/valuefix

Change mValue type for clothes to unsigned short (bug #3960)

History

#1 Updated by Andrei Kortunov 2 months ago

UPDATE: it seems we have a "short" mValue only for clothes, it other cases both Morrowind and OpenMW use integer fields.

#2 Updated by Andrei Kortunov 2 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

#3 Updated by Alexei Dobrohotov about 2 months ago

  • Category set to General
  • Assignee set to Andrei Kortunov
  • Target version set to openmw-0.43

#4 Updated by Alexei Dobrohotov 12 days ago

  • Subject changed from OpenMW does not handle items with high cost (> 32768) properly (variable overflow) to Clothes with high cost (> 32768) are not handled properly

Also available in: Atom PDF