summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-05-30 23:33:47 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-05-30 23:33:47 (GMT)
commit03a048afe548b4fcbf281b5e3cb593f006c1d087 (patch)
tree0550394b7f27dad037d43ce0ebcc293e560f6b45 /src
parent7a875dd846ba7f28e54350e5f3b9d8836b7d069d (diff)
downloadpowder-03a048afe548b4fcbf281b5e3cb593f006c1d087.zip
powder-03a048afe548b4fcbf281b5e3cb593f006c1d087.tar.gz
Add calm blue text colour, buffer overflow fix for richtext
Diffstat (limited to 'src')
-rw-r--r--src/graphics.c5
-rw-r--r--src/interface.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/graphics.c b/src/graphics.c
index 94c043f..93edd41 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -861,6 +861,11 @@ int drawtext(pixel *vid, int x, int y, const char *s, int r, int g, int b, int a
r = g = 0;
b = 255;
break;
+ case 't':
+ b = 255;
+ g = 170;
+ r = 32;
+ break;
}
s++;
}
diff --git a/src/interface.c b/src/interface.c
index ec97c94..465d58e 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -551,6 +551,8 @@ int markup_getregion(char *text, char *action, char *data, char *atext){
void ui_richtext_settext(char *text, ui_richtext *ed)
{
int pos = 0, action = 0, ppos = 0, ipos = 0;
+ memset(ed->printstr, 0, 512);
+ memset(ed->str, 0, 512);
strcpy(ed->str, text);
//strcpy(ed->printstr, text);
for(action = 0; action < 6; action++){