Yes, but 99999 is an arbitrary limit, that may break something for a user where it could have worked.
I'm guessing that the max-items is an int, but using MAX_INT when it is ensures that this only breaks if there's no way it could have worked.
Of course, the **real** fix to this is to have the split functions interpret 0 as meaning "no bound" so that we can just pass 0 here.  (Asking for a split with at most 0 entries would be absurd otherwise, so it's safe to overload 0 as the special case; and this would let us switch to an unsigned type for max.)