Skip to content

Commit

Permalink
Sanitize displayName field
Browse files Browse the repository at this point in the history
Thanks to @azzdayz
  • Loading branch information
oiad committed Jul 16, 2017
1 parent 6c48d9f commit f99d1a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dayz_server/compile/garage/server_storeVehicle.sqf
@@ -1,4 +1,4 @@
private ["_vehicle","_player","_clientID","_playerUID","_name","_class","_charID","_damage","_fuel","_hit","_inventory","_query","_array","_hit","_selection","_colour","_colour2","_displayName"];
private ["_vehicle","_player","_clientID","_playerUID","_name","_nameArray","_class","_charID","_damage","_fuel","_hit","_inventory","_query","_array","_hit","_selection","_colour","_colour2","_displayName"];

_vehicle = _this select 0;
_player = _this select 1;
Expand All @@ -9,6 +9,8 @@ _name = if (alive _player) then {name _player;} else {"unknown player";};

_class = typeOf _vehicle;
_displayName = getText(configFile >> "cfgVehicles" >> _class >> "displayName");
_nameArray = (toArray _displayName) - [39];
_displayName = toString _nameArray;
_charID = _vehicle getVariable ["CharacterID","0"];
_damage = damage _vehicle;
_fuel = fuel _vehicle;
Expand Down

0 comments on commit f99d1a0

Please sign in to comment.