Warzone2100 / old-trac-import

Archived Import of (old) Warzone 2100 Trac
0 stars 0 forks source link

warcam started at distance < 0 breaks zoom when stopped #4830

Closed wzdev-ci closed 6 years ago

wzdev-ci commented 6 years ago

resolution_fixed type_patch (an actual patch, not a request for one) | by Forgon


Starting the warcam in debug mode at a distance < 0 and stopping it afterwards set the zoom to a value of approximately 2^32^ minus the negative distance (see attached image [raw-attachment:warcam_zoom_bug.png]).

This was a type error: The distance, a float, was stored in an uint32_t (or UDWORD, as defined in './lib/framework/types.h:103'). The problem had been introduced in

` commit 1c580714051c3baeadea53e4c3dd494a8c10e443 Author: per per@wz2100.net Date: Tue Jan 15 22:36:51 2013 +0100

Remove zoom limits in debug mode.

'

The attached patch fixes the problem.


Issue migrated from trac:4830 at 2022-04-16 13:08:54 -0700

wzdev-ci commented 6 years ago

Forgon _uploaded file warcam_zoom_bug.png (69.9 KiB)_

warcam stopped after start at distance -250, leading to a zoom value of 2^32^-256 warcam_zoom_bug.png

wzdev-ci commented 6 years ago

Forgon _uploaded file warcam_zoom.patch (1.5 KiB)_

patch file created with git format-patch

wzdev-ci commented 6 years ago

Forgon2100 forgon2100@... changed status from new to closed

wzdev-ci commented 6 years ago

Forgon2100 forgon2100@... changed owner from ` toForgon2100 forgon2100@protonmail.com`

wzdev-ci commented 6 years ago

Forgon2100 forgon2100@... changed resolution from ` tofixed`

wzdev-ci commented 6 years ago

Forgon2100 forgon2100@... committed [46]


In https://github.com/Warzone2100/warzone2100/commit/46b191aac5167ee3766b1c869aae08351ee89b94:

#CommitTicketReference repository="" revision="46b191aac5167ee3766b1c869aae08351ee89b94"
fixes #4830: warcam started at distance < 0 no longer breaks zoom when stopped
wzdev-ci commented 6 years ago

Forgon changed type from bug to patch (an actual patch, not a request for one)