summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-01-27 11:27:53 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-01-27 11:27:53 +0000
commit21e89e87865abdc7b61afcded42a2906b2f5fee7 (patch)
tree59e30c0a55593bcb31f76ca0f673dc365c98b113 /lib
parent166c8bf46fc2f30e131b81fe86ace00b6bdf7bd1 (diff)
downloadrockbox-21e89e87865abdc7b61afcded42a2906b2f5fee7.tar.gz
rockbox-21e89e87865abdc7b61afcded42a2906b2f5fee7.zip
Add some better debug info for when checkwps erros out because of full skin buffer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29144 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'lib')
-rw-r--r--lib/skin_parser/skin_buffer.c4
-rw-r--r--lib/skin_parser/skin_debug.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/skin_parser/skin_buffer.c b/lib/skin_parser/skin_buffer.c
index 0f72f768dd..8d94c1acdb 100644
--- a/lib/skin_parser/skin_buffer.c
+++ b/lib/skin_parser/skin_buffer.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include "skin_buffer.h"
+#include "skin_parser.h"
/****************************************************************************
*
@@ -103,7 +104,10 @@ void* skin_buffer_alloc(size_t size)
/* 32-bit aligned */
size = (size + 3) & ~3;
if (size > skin_buffer_freespace())
+ {
+ skin_error(MEMORY_LIMIT_EXCEEDED, NULL);
return NULL;
+ }
retval = buffer_front;
buffer_front += size;
#elif defined(USE_HOST_MALLOC)
diff --git a/lib/skin_parser/skin_debug.c b/lib/skin_parser/skin_debug.c
index bcf43ab5e4..52f9127f1f 100644
--- a/lib/skin_parser/skin_debug.c
+++ b/lib/skin_parser/skin_debug.c
@@ -56,6 +56,8 @@ void skin_error(enum skin_errorcode error, const char* cursor)
switch(error)
{
case MEMORY_LIMIT_EXCEEDED:
+ error_line_start = NULL;
+ printf("Error: Memory limit exceeded at Line %d\n", skin_line);
error_message = "Memory limit exceeded";
break;
case NEWLINE_EXPECTED: