Skip to content

Commit

Permalink
fix(server/vehicle): ensure plate is not longer than 8 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Oct 25, 2024
1 parent 4968f7b commit 9bbbab6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/vehicle/class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export class OxVehicle extends ClassInterface {
setPlate(plate: string) {
if (this.plate === plate) return;

this.plate = plate.padEnd(8);
this.plate = this.plate.length > 8 ? this.plate.substring(0, 8) : this.plate.padEnd(8);

SetVehicleColumn(this.id, 'plate', this.plate);
}
Expand Down

0 comments on commit 9bbbab6

Please sign in to comment.