diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2011-01-27 11:27:53 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2011-01-27 11:27:53 +0000 |
commit | 21e89e87865abdc7b61afcded42a2906b2f5fee7 (patch) | |
tree | 59e30c0a55593bcb31f76ca0f673dc365c98b113 /lib | |
parent | 166c8bf46fc2f30e131b81fe86ace00b6bdf7bd1 (diff) | |
download | rockbox-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.c | 4 | ||||
-rw-r--r-- | lib/skin_parser/skin_debug.c | 2 |
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 @@ | |||
25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
26 | 26 | ||
27 | #include "skin_buffer.h" | 27 | #include "skin_buffer.h" |
28 | #include "skin_parser.h" | ||
28 | 29 | ||
29 | /**************************************************************************** | 30 | /**************************************************************************** |
30 | * | 31 | * |
@@ -103,7 +104,10 @@ void* skin_buffer_alloc(size_t size) | |||
103 | /* 32-bit aligned */ | 104 | /* 32-bit aligned */ |
104 | size = (size + 3) & ~3; | 105 | size = (size + 3) & ~3; |
105 | if (size > skin_buffer_freespace()) | 106 | if (size > skin_buffer_freespace()) |
107 | { | ||
108 | skin_error(MEMORY_LIMIT_EXCEEDED, NULL); | ||
106 | return NULL; | 109 | return NULL; |
110 | } | ||
107 | retval = buffer_front; | 111 | retval = buffer_front; |
108 | buffer_front += size; | 112 | buffer_front += size; |
109 | #elif defined(USE_HOST_MALLOC) | 113 | #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) | |||
56 | switch(error) | 56 | switch(error) |
57 | { | 57 | { |
58 | case MEMORY_LIMIT_EXCEEDED: | 58 | case MEMORY_LIMIT_EXCEEDED: |
59 | error_line_start = NULL; | ||
60 | printf("Error: Memory limit exceeded at Line %d\n", skin_line); | ||
59 | error_message = "Memory limit exceeded"; | 61 | error_message = "Memory limit exceeded"; |
60 | break; | 62 | break; |
61 | case NEWLINE_EXPECTED: | 63 | case NEWLINE_EXPECTED: |