Fix bug in confirmation util

This commit is contained in:
Magnus Ulf 2019-02-08 12:29:39 +01:00
parent 5fe9d05e1b
commit 5302f808d7

View File

@ -103,9 +103,9 @@ public class ConfirmationUtil
boolean hasConfirmationString = hasConfirmationString(object, sender); boolean hasConfirmationString = hasConfirmationString(object, sender);
boolean hasTypedConfirmationString = object.argIsSet(idx); boolean hasTypedConfirmationString = object.argIsSet(idx);
boolean hasTypedOther = object.argIsSet(idx-1); boolean hasTypedOther = idx == 0 || object.argIsSet(idx-1);
// Assetion should not happen // Assertion should not happen
if (hasTypedConfirmationString && !hasTypedOther) throw new RuntimeException(); if (hasTypedConfirmationString && !hasTypedOther) throw new RuntimeException();
if (!hasTypedOther) if (!hasTypedOther)