From 83e39350079127a9417c4e418bce06eae512a268 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Mon, 13 Aug 2018 12:38:04 -1000 Subject: [PATCH] Fix NBT name search matching unnamed tags --- src/mcedit2/editorcommands/find_replace/nbt.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mcedit2/editorcommands/find_replace/nbt.py b/src/mcedit2/editorcommands/find_replace/nbt.py index 478d0fb..97fd3f3 100644 --- a/src/mcedit2/editorcommands/find_replace/nbt.py +++ b/src/mcedit2/editorcommands/find_replace/nbt.py @@ -443,8 +443,13 @@ class FindReplaceNBT(QtGui.QWidget, Ui_findNBTWidget): ok = False elif not (targetValue == tag.value): ok = False - if searchNames and isinstance(name_or_index, basestring) and not (targetName == name_or_index): - ok = False + if searchNames: + if not isinstance(name_or_index, basestring): + ok = False + elif (targetName == name_or_index): + ok = True + else: + ok = False return ok def _findTag(name_or_index, tag, path):