--- string_format.complete.h 2010-06-25 15:21:20.458257318 -0300 +++ string_format.crippled.h 2010-06-25 15:24:46.264227295 -0300 @@ -454,6 +454,10 @@ if (*first_idx_is_an_integer == 0 && PyErr_Occurred()) return 0; + /* Don't allow negative index fields */ + if (*first_idx_is_an_integer && *first_idx < 0) + *first_idx_is_an_integer = 0; + field_name_is_empty = first->ptr >= first->end; /* If the field name is omitted or if we have a numeric index