浏览代码

[fixed] `strpos` not finding anything return 0 instead of -1 (while `arrpos` returns -1) is annoying. Fixed a bug in saveupdater related to that

anjuna krokus 6 月之前
父节点
当前提交
9b4635ed09
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      locations/saveupdater.qsrc

+ 3 - 3
locations/saveupdater.qsrc

@@ -2829,10 +2829,10 @@ if temp_current_save_version < 00090300:
 	!! Telephone call migration to their correct event locations
 	if arrpos('$contact', 'A108') > -1:
 		temp_pos = arrpos('$contact', 'A108')
-		if strpos($contactICode[temp_pos], 'telefon') > -1:
+		if strpos($contactICode[temp_pos], 'telefon') > 0:
 			$contactICode[temp_pos] = replace($contactICode[temp_pos], "'telefon', 'vladimir'", "'vladimirQW_loc', 'telephone_call'")
 		end
-		if strpos($contactISche[temp_pos], 'vladimirday') > -1:
+		if strpos($contactISche[temp_pos], 'vladimirday') > 0:
 			$contactISche[temp_pos] = replace($contactISche[temp_pos], "vladimirday", "vladimirQW['day']")
 		end
 		killvar 'temp_pos'
@@ -2840,7 +2840,7 @@ if temp_current_save_version < 00090300:
 
 	if arrpos('$contact', 'A192') > -1:
 		temp_pos = arrpos('$contact', 'A192')
-		if strpos($contactOCode[temp_pos], 'telefon') > -1:
+		if strpos($contactOCode[temp_pos], 'telefon') > 0:
 			$contactOCode[temp_pos] = replace($contactOCode[temp_pos], 'telefon', 'nastja')
 		end
 		killvar 'temp_pos'