summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libmysqlpp/my-connection.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libmysqlpp/my-connection.cpp b/libmysqlpp/my-connection.cpp
index 30cef18..5828986 100644
--- a/libmysqlpp/my-connection.cpp
+++ b/libmysqlpp/my-connection.cpp
@@ -154,9 +154,9 @@ namespace MySQL {
local_infile_read(void * obj, char * buf, unsigned int bufSize)
{
auto ctx = static_cast<LoadContext *>(obj);
- if (ctx->loadBufLen - ctx->bufOff == 0) {
+ if (ctx->loadBufLen == ctx->bufOff) {
ctx->swapContext();
- if (ctx->loadBufLen - ctx->bufOff <= 0) {
+ if (ctx->loadBufLen == ctx->bufOff) {
// Nothing to do or error
return ctx->bufOff;
}