From a41f0a02569fa9e22fd4b7338c9ae73bb1301064 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Thu, 2 Jul 2009 01:28:42 -0400 Subject: [PATCH] Bug Fix - uuids not unique - Fixed bug that caused code to use a combination of srandom and rand, or srand and random. Should be srandom/random, srand/rand, not a mix. - Fixed bug that failed to set uuid in handleAdd, such that the uuid already assigned in context.task was used, which was generated before srand/srandom was is called. --- src/command.cpp | 1 + src/main.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/command.cpp b/src/command.cpp index 3b8bb4577..bfb0dcc3f 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -52,6 +52,7 @@ std::string handleAdd () { std::stringstream out; + context.task.set ("uuid", uuid ()); context.task.setEntry (); // Recurring tasks get a special status. diff --git a/src/main.cpp b/src/main.cpp index 30fb7270d..b5e956cbf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,6 +29,7 @@ #include #include #include "Context.h" +#include "../auto.h" Context context;