Glenn Morris wrote: > Your example doesn't correspond to how the code in Emacs used to be. > Change it to: > > for (int pos = 0; gciphers[pos] != GNUTLS_CIPHER_NULL; pos++) > > and it fails for me, just as Emacs used to: Weirder and weirder. First, with that change the code still works for me (I tried it with GnuTLS 3.4.10). Second, if I read the GnuTLS 3.2.21 source code, the changed code should still work for you too. This is because the test gciphers[pos] != GNUTLS_CIPHER_NULL should succeed one iteration before the test gciphers[pos] != 0 succeeds. > > gciphers[17] == GNUTLS_CIPHER_UNKNOWN ?!? > > As I said, it seems to be a happy accident that GNUTLS_CIPHER_UNKNOWN == 0. > So your example as written happens to skip it. > > I hope we have now established I'm not mad or lying... :) Sorry, not established yet. :-) Quite possibly I'm the crazy one, of course. Still, there's something very odd going on here. To make sure we're on the same page I am attaching the changed code, which still works for me.