Nexushyper
Warlord
When play Civ I like to rename my units. If I have a large border with tons of units I will create Divisions and regiments, etc. Well, today I was renaming units and while using Copy Paste (That is CTRL-C and CTRL-V) I noticed a bug.
I was renaming a group of units to 3rd Division 1st Infantry Regiment, and decided to copy the name and then paste it to the next Infantry unit and change the 1st to 2nd. Making it easier to rename units. Well, I noticed that when I was finished with teh Infantry and moved to calvary, changed the numbers etc, and recopied and then pasted to the next calavary unit it read as follows 3rd Division 4th Infantry Regimentt. (The final name for the calvary unit was 3rd Division 1st Calvary Regiment) Notice the extra 't' at the end. When I moved to artillery and copied from the last calvary unit and pasted to the first artillery unit it now had 2 extra 't's so it read 3rd Division 11th Calvary Regimenttt. (Again the final name for the artillery unit was 3rd Division 1st Artillery Regiment)
So I tested this and found that when I was at the end of the naming block (That is the curse is after the t in the name 3rd Division 1st Infantry Regiment) and I pressed and held SHIFT then pressed HOME (to hilight the entire name) and then pressed and held CTRL the pressed C (To copy the whole name) and then went to another unit and pressed CTRL-V (to paste the name) it would add extra characters (in my test always an exra t). But if the cursor was at the beginning of the naming block and I pressed SHIFT END and CTRl-C then CTRl-V in a different units naming block I did not have the problem.
I am guessing that Civ3 PTW (did vanilla civ3 have renaming??) they hardcoded thier own COPY and PASTE key functions instead of using the built in Windows Copy and Paste functions and somehow there is a problem with the String Variable that holds the copied text. It appears that the copied text is writes over the previous copied text but does not clear it out first so that if the first copied text was longer than the second the extra letters stay in the string, unless you copy from the beginning of the rename block which clears the copy String.
Again, I can't see the hardcode, but as a programmer myself this is what it looks like it is doing. A simply fix, just run the copy paste code and see if there is a problem with pressing the HOME key while holding SHIFT or something liek that, and verify that when Coping that the string that holds teh copied text is cleared first.
I am running Windows 98 SE with all current patches
CIV3 PTW most current patch (1.27??)
I can give you a saved game if needed.
I was renaming a group of units to 3rd Division 1st Infantry Regiment, and decided to copy the name and then paste it to the next Infantry unit and change the 1st to 2nd. Making it easier to rename units. Well, I noticed that when I was finished with teh Infantry and moved to calvary, changed the numbers etc, and recopied and then pasted to the next calavary unit it read as follows 3rd Division 4th Infantry Regimentt. (The final name for the calvary unit was 3rd Division 1st Calvary Regiment) Notice the extra 't' at the end. When I moved to artillery and copied from the last calvary unit and pasted to the first artillery unit it now had 2 extra 't's so it read 3rd Division 11th Calvary Regimenttt. (Again the final name for the artillery unit was 3rd Division 1st Artillery Regiment)
So I tested this and found that when I was at the end of the naming block (That is the curse is after the t in the name 3rd Division 1st Infantry Regiment) and I pressed and held SHIFT then pressed HOME (to hilight the entire name) and then pressed and held CTRL the pressed C (To copy the whole name) and then went to another unit and pressed CTRL-V (to paste the name) it would add extra characters (in my test always an exra t). But if the cursor was at the beginning of the naming block and I pressed SHIFT END and CTRl-C then CTRl-V in a different units naming block I did not have the problem.
I am guessing that Civ3 PTW (did vanilla civ3 have renaming??) they hardcoded thier own COPY and PASTE key functions instead of using the built in Windows Copy and Paste functions and somehow there is a problem with the String Variable that holds the copied text. It appears that the copied text is writes over the previous copied text but does not clear it out first so that if the first copied text was longer than the second the extra letters stay in the string, unless you copy from the beginning of the rename block which clears the copy String.
Again, I can't see the hardcode, but as a programmer myself this is what it looks like it is doing. A simply fix, just run the copy paste code and see if there is a problem with pressing the HOME key while holding SHIFT or something liek that, and verify that when Coping that the string that holds teh copied text is cleared first.
I am running Windows 98 SE with all current patches
CIV3 PTW most current patch (1.27??)
I can give you a saved game if needed.