User forums > General (but related to Code::Blocks)

Bug in CodeBlocks for Windows 10, Mingw compiler or debugger?

<< < (2/3) > >>

rudolf128:
Please notice that the code in your last post is missing the indexing by i. The right code is:

void inittables(void)
{
  int i;
  for (i = 1; Tabring.key[0]; i++)
    fillhash(RINGTAB, i, Tabring.key); // <- Here
  for (i = 1; Tabmod.key[0]; i++)
    fillhash(MODTAB, i, Tabmod.key);
}

Miguel Gimenez:
The index start value is irrelevant, because the loop condition (Tabring.key[0]) is constant and independent of the index.

In any case the unexpected behaviour of your code is not a bug in C::B, so you must ask in a general programming forum.

rudolf128:
I dont know how it happened, but I am sure the code I sent was not the one that appears at post 15 but:

void inittables(void)
{
  int i;
  for (i = 1; Tabring.key[0]; i++)
    fillhash(RINGTAB, i, Tabring.key); // <- Here
  for (i = 1; Tabmod.key[0]; i++)
    fillhash(MODTAB, i, Tabmod.key);
}

rudolf128:
Well, this is even more strange! In my previous post, Tabring is indexed by , but now I see this dissapeared in the post!
So, now I will attach the complete code (not from the large program but from the Test).

rudolf128:
To be sure, I downloaded my own attachment, and I got it OK.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version