From 0583ceb282b0bd4421e1208d39ca7ed3292dc074 Mon Sep 17 00:00:00 2001 From: Petr Bena Date: Sun, 25 May 2014 16:16:18 +0200 Subject: [PATCH] fixed a bug don't include author name if it's empty, otherwise stikked has some problems rendering it --- stikkit/configure.ac | 2 +- stikkit/main.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/stikkit/configure.ac b/stikkit/configure.ac index 8afa3ee..6d74b87 100644 --- a/stikkit/configure.ac +++ b/stikkit/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT(stikkit, 1.0.0, benapetr@gmail.com) +AC_INIT(stikkit, 1.0.1, benapetr@gmail.com) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([configuration.cpp]) diff --git a/stikkit/main.cpp b/stikkit/main.cpp index ee25a46..033a582 100644 --- a/stikkit/main.cpp +++ b/stikkit/main.cpp @@ -89,8 +89,11 @@ int main(int argc, char *argv[]) readBuffer.clear(); string post = "text="; post += curl_easy_escape(curl, Stikkit::Configuration::Source.c_str(), Stikkit::Configuration::Source.length()); - post += "&name="; - post += curl_easy_escape(curl, Stikkit::Configuration::Author.c_str(), Stikkit::Configuration::Author.length()); + if (Stikkit::Configuration::Author.length() > 0) + { + post += "&name="; + post += curl_easy_escape(curl, Stikkit::Configuration::Author.c_str(), Stikkit::Configuration::Author.length()); + } if (Stikkit::Configuration::Title.length() > 0) { post += "&title=";