From f8289d9bd1faff400728cb8e1ac0b1aa68bfbc32 Mon Sep 17 00:00:00 2001 From: ethannicholas Date: Thu, 11 Feb 2016 13:10:37 -0800 Subject: [PATCH] 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 --- tools/debugger/SkDebugCanvas.h | 2 +- tools/skiaserve/skiaserve.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/debugger/SkDebugCanvas.h b/tools/debugger/SkDebugCanvas.h index 339e7add4a..9a4a9d603b 100644 --- a/tools/debugger/SkDebugCanvas.h +++ b/tools/debugger/SkDebugCanvas.h @@ -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. */ diff --git a/tools/skiaserve/skiaserve.cpp b/tools/skiaserve/skiaserve.cpp index 4b2d52b612..7d62b1728c 100644 --- a/tools/skiaserve/skiaserve.cpp +++ b/tools/skiaserve/skiaserve.cpp @@ -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); }