Explorar o código

Fix if(rlen != rlen)

pavel.pimenov %!s(int64=8) %!d(string=hai) anos
pai
achega
335b8e4478
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      examples/embedded_cpp/embedded_cpp.cpp

+ 2 - 2
examples/embedded_cpp/embedded_cpp.cpp

@@ -177,7 +177,7 @@ class FooHandler : public CivetHandler
 				break;
 			}
 			wlen = mg_write(conn, buf, (size_t)rlen);
-			if (rlen != rlen) {
+			if (wlen != rlen) {
 				break;
 			}
 			nlen += wlen;
@@ -244,7 +244,7 @@ class FooHandler : public CivetHandler
                     break;
                 }
                 wlen = fwrite(buf, 1, (size_t)rlen, f);
-                if (rlen != rlen) {
+                if (wlen != rlen) {
                     fail = 1;
                     break;
                 }