pavkam / tzdb

Delphi/FPC Time Zone Database
https://www.iana.org/time-zones
BSD 3-Clause "New" or "Revised" License
84 stars 27 forks source link

Extra comma in generated CRuleFamilies #14

Closed tfrost closed 5 years ago

tfrost commented 5 years ago

An extra comma can appear after the last item. I have fixed it in TZSchema.pas by adding a new local integer variable nFamilies. Then before the loop to generate this array add: nFamilies := FRuleFamilies.Count - LGhosts; and instead of the test to write the comma: Dec(nFamilies); if nFamilies > 0 then Write(LFile, ',');

pavkam commented 5 years ago

Thanks, I have applied a fix. Will test later.