--- /DoubleMetaphone.java	2023-07-05 03:08:48.766033279 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/language/DoubleMetaphone.java	2023-07-05 03:08:48.770033280 +0200
@@ -145,7 +145,7 @@
                 break;
             case 'N':
                 result.append('N');
-                index = charAt(value, index + 1) == 'N' ? index + 2 : index + 1;
+index = charAt ( value, index  ==  1 )  == 'N' ? index + 2 : index + 1;
                 break;
             case '\u00D1':
                 // N with a tilde (spanish ene)
