/*
- * Copyright (C) 2012, 2013
+ * Copyright (C) 2012, 2013, 2014
* Dale Weiler
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
#define GMQCC_PLATFORM_HEADER
#include <string.h>
#include <stdlib.h>
-#include <unistd.h>
#include "platform.h"
#include "gmqcc.h"
len = vsnprintf(buf, sizeof(buf), fmt, cpy);
va_end (cpy);
+ if (len < 0)
+ return len;
+
if (len < (int)sizeof(buf)) {
*dat = util_strdup(buf);
return len;