From 5aa7202a787a0db759ee33dc48342e76fe4d2d35 Mon Sep 17 00:00:00 2001 From: Jim Menard Date: Tue, 10 Feb 2009 13:04:19 -0500 Subject: [PATCH] Hard limit values are negative. --- lib/mongo/message/query_message.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mongo/message/query_message.rb b/lib/mongo/message/query_message.rb index 2e8bb1e..c626d03 100644 --- a/lib/mongo/message/query_message.rb +++ b/lib/mongo/message/query_message.rb @@ -16,7 +16,7 @@ module XGen write_int(0) write_string("#{db_name}.#{collection_name}") write_int(query.number_to_skip) - write_int(query.number_to_return) + write_int(-query.number_to_return) # Negative means hard limit sel = query.selector if query.contains_special_fields sel = OrderedHash.new