--- sphinx-0.9.8/api/libsphinxclient/sphinxclient.c 2008-07-15 17:30:36.000000000 +0400 +++ sphinx-0.9.8.my/api/libsphinxclient/sphinxclient.c 2008-10-08 11:38:31.000000000 +0400 @@ -411,8 +411,12 @@ client->offset = offset; client->limit = limit; - client->max_matches = max_matches; - client->cutoff = cutoff; + if (max_matches > 0) { + client->max_matches = max_matches; + } + if (cutoff > 0) { + client->cutoff = cutoff; + } return SPH_TRUE; }