Permalink
Browse files

minor: fix off by one error

  • Loading branch information...
1 parent bc9ec4a commit 1581a3d128d69282a20612e0148a187537f2277b @banker banker committed Jun 1, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/mongo.c
View
@@ -122,7 +122,7 @@ MONGO_EXPORT void __mongo_set_error( mongo *conn, mongo_error_t err, const char
str_size = strlen( str ) + 1;
errstr_size = str_size > MONGO_ERR_LEN ? MONGO_ERR_LEN : str_size;
memcpy( conn->errstr, str, errstr_size );
- conn->errstr[errstr_size] = '\0';
+ conn->errstr[errstr_size-1] = '\0';
}
}

0 comments on commit 1581a3d

Please sign in to comment.