OpenTTD

Tasklist

FS#3710 - CloneVehicleName respect left-padding when incrementing custom number

Attached to Project: OpenTTD
Opened by S├ębastien Brissaud (sbr) - Friday, 19 March 2010, 21:42 GMT
Last edited by Peter Nelson (peter1138) - Sunday, 21 March 2010, 11:36 GMT
Type Patch
Category Core
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

When CloneVehicleName find a number at the end of the vehicle custom name, it try to increment it to generate a new name. However when the number it found is left-padded, the incremented name isn't anymore.
For example CloneVehicleName("Veh #0101") returns "Veh #102".

This patch make CloneVehicleName respect the original number padding and thus obtaining "Veh #0102" from "Veh #0101".

Please find an attached patch against r19475.
This task depends upon

Closed by  Peter Nelson (peter1138)
Sunday, 21 March 2010, 11:36 GMT
Reason for closing:  Implemented
Additional comments about closing:  In r19498.

Thanks.

Loading...