← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2779: Fix param check

 

------------------------------------------------------------
revno: 2779
committer: Jacek Sieka <arnetheduck@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Sat 2011-12-31 16:50:55 +0100
message:
  Fix param check
modified:
  utils/xsum.cpp


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'utils/xsum.cpp'
--- utils/xsum.cpp	2011-12-31 15:22:17 +0000
+++ utils/xsum.cpp	2011-12-31 15:50:55 +0000
@@ -25,8 +25,8 @@
 		return 1;
 	}
 
-	auto direct = argc < 2 ? true : argv[2][0] == '0';
-	auto bufSize = argc < 3 ? 0 : Util::toInt(argv[3]);
+	auto direct = argc < 3 ? true : argv[2][0] == '0';
+	auto bufSize = argc < 4 ? 0 : Util::toInt(argv[3]);
 
 	try {
 		auto start = microsec_clock::universal_time();