Fix for exploit that allowed WPE to create a character with a custom hair style/hair color not available to other players, to then crash them. from the comments within bugreport:150

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15449 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
shennetsind 2012-01-14 10:41:46 +00:00
parent 54eb42ab7f
commit 764b35ce4c

View File

@ -5078,9 +5078,9 @@ void status_set_viewdata(struct block_list *bl, int class_)
sd->vd.head_top = sd->status.head_top; sd->vd.head_top = sd->status.head_top;
sd->vd.head_mid = sd->status.head_mid; sd->vd.head_mid = sd->status.head_mid;
sd->vd.head_bottom = sd->status.head_bottom; sd->vd.head_bottom = sd->status.head_bottom;
sd->vd.hair_style = sd->status.hair; sd->vd.hair_style = cap_value(sd->status.hair,0,battle_config.max_hair_style);
sd->vd.hair_color = sd->status.hair_color; sd->vd.hair_color = cap_value(sd->status.hair,0,battle_config.max_hair_color);
sd->vd.cloth_color = sd->status.clothes_color; sd->vd.cloth_color = cap_value(sd->status.clothes_color,0,battle_config.max_cloth_color);
sd->vd.sex = sd->status.sex; sd->vd.sex = sd->status.sex;
} else if (vd) } else if (vd)
memcpy(&sd->vd, vd, sizeof(struct view_data)); memcpy(&sd->vd, vd, sizeof(struct view_data));