fixed off-by-one error in skiaserve /cmd

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1692683002

Review URL: https://codereview.chromium.org/1692683002
This commit is contained in:
ethannicholas 2016-02-11 13:10:37 -08:00 committed by Commit bot
parent 5e58ceea85
commit f8289d9bd1
2 changed files with 2 additions and 2 deletions

View File

@ -141,7 +141,7 @@ public:
SkString clipStackData() const { return fClipStackData; }
/**
Returns a JSON object representing up to N draws, where N is < SkDebugCanvas::getSize().
Returns a JSON object representing up to N draws, where N is <= SkDebugCanvas::getSize().
The encoder may use the UrlDataManager to store binary data such as images, referring to
them via URLs embedded in the JSON.
*/

View File

@ -233,7 +233,7 @@ public:
if (0 == strcmp(method, MHD_HTTP_METHOD_GET)) {
int n;
if (commands.count() == 1) {
n = request->fDebugCanvas->getSize() - 1;
n = request->fDebugCanvas->getSize();
} else {
sscanf(commands[1].c_str(), "%d", &n);
}