Juergen Spitzmueller wrote: > Jean-Marc Lasgouttes wrote: >> Juergen, could you take a look at this? > > The off-by-one-error is in tex-strings.C. I think that the attached > solution is correct and safe, but I'd like to hear your opinion. > Please also tell me if I can apply this also to 1.3 > > Regards, > Jürgen
Yuck. Let the compiler work out how many data points there are: char const * string_paperpackages[] = { "none", "a4", "a4wide", "widemarginsa4", "" }; size_t const size_string_paperpackages = sizeof(string_paperpackages) / sizeof(string_paperpackages[0]); Also add another const: -char const * string_paperpackages[] = { +char const * const string_paperpackages[] = { -- Angus