Skip to content

Commit

Permalink
-5 to -1
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Curtin <[email protected]>
  • Loading branch information
ericcurtin committed Dec 15, 2024
1 parent 410684b commit 1090741
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/run/run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ static std::string fmt(const char * fmt, ...) {
const int size = vsnprintf(NULL, 0, fmt, ap);
GGML_ASSERT(size >= 0 && size < INT_MAX); // NOLINT
std::string buf;
buf.resize(size + 1);
const int size2 = vsnprintf(const_cast<char *>(buf.data()), buf.size(), fmt, ap2);
buf.resize(size);
const int size2 = vsnprintf(const_cast<char *>(buf.data()), buf.size() + 1, fmt, ap2);
GGML_ASSERT(size2 == size);
va_end(ap2);
va_end(ap);
Expand Down Expand Up @@ -370,7 +370,7 @@ class HttpClient {
}

static int calculate_progress_bar_width(const std::string & progress_prefix, const std::string & progress_suffix) {
int progress_bar_width = get_terminal_width() - progress_prefix.size() - progress_suffix.size() - 5;
int progress_bar_width = get_terminal_width() - progress_prefix.size() - progress_suffix.size() - 1;
if (progress_bar_width < 1) {
progress_bar_width = 1;
}
Expand Down

0 comments on commit 1090741

Please sign in to comment.