From d1a635a06f5152b51d0879176f011b5c6e45431c Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 16 Nov 2013 03:39:29 +0100 Subject: Improved itemdb converter robustness in case of extra spaces - Thanks to GM.PiXeL for reporting the issue. Signed-off-by: Haru --- tools/itemdbconverter.pl | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'tools/itemdbconverter.pl') diff --git a/tools/itemdbconverter.pl b/tools/itemdbconverter.pl index 54c17262d..13805c09e 100755 --- a/tools/itemdbconverter.pl +++ b/tools/itemdbconverter.pl @@ -74,25 +74,25 @@ sub parsedb (@) { # ID,AegisName,Name,Type,Buy,Sell,Weight,ATK,DEF,Range,Slots,Job,Upper,Gender,Loc,wLV,eLV,Refineable,View,{ Script },{ OnEquip_Script },{ OnUnequip_Script } if( $_ =~ qr/^ (?(?:\/\/[^0-9]*)?) - (?[0-9]+), + (?[0-9]+)[^,]*, (?[^,]+), - (?[^,]+), - (?[0-9]+), - (?[0-9]*), - (?[0-9]*), - (?[0-9]*), - (?[0-9-]*)(?:(?[0-9-]*))?, - (?[0-9-]*), - (?[0-9]*), - (?[0-9]*), - (?[x0-9A-Fa-f]*), - (?[0-9]*), - (?[0-9]*), - (?[0-9]*), - (?[0-9]*), - (?[0-9]*)(?:(?[0-9]*))?, - (?[0-9]*), - (?[0-9]*), + (?[^,]+),[\s\t]* + (?[0-9]+)[^,]*,[\s\t]* + (?[0-9]*)[^,]*,[\s\t]* + (?[0-9]*)[^,]*,[\s\t]* + (?[0-9]*)[^,]*,[\s\t]* + (?[0-9-]*)[^,:]*(?:[\s\t]*(?[0-9-]*))?[^,]*,[\s\t]* + (?[0-9-]*)[^,]*,[\s\t]* + (?[0-9]*)[^,]*,[\s\t]* + (?[0-9]*)[^,]*,[\s\t]* + (?[x0-9A-Fa-f]*)[^,]*,[\s\t]* + (?[0-9]*)[^,]*,[\s\t]* + (?[0-9]*)[^,]*,[\s\t]* + (?[0-9]*)[^,]*,[\s\t]* + (?[0-9]*)[^,]*,[\s\t]* + (?[0-9]*)[^,:]*(?:[\s\t]*(?[0-9]*))?[^,]*,[\s\t]* + (?[0-9]*)[^,]*,[\s\t]* + (?[0-9]*)[^,]*,[\s\t]* {(?