Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 5th, 2011  |  syntax: None  |  size: 0.76 KB  |  views: 81  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff --git a/firmware/font.c b/firmware/font.c
  2. index f00ff0e..7d28368 100644
  3. --- a/firmware/font.c
  4. +++ b/firmware/font.c
  5. @@ -594,14 +614,17 @@ struct font* font_get(int font)
  6.          return &sysfont;
  7.  
  8.      while (1) {
  9. -        struct buflib_alloc_data *alloc = core_get_data(buflib_allocations[font]);
  10. -        pf = &alloc->font;
  11. -        if (pf && pf->height)
  12. -            return pf;
  13. +        if (buflib_allocations[font] > 0)
  14. +        {
  15. +            struct buflib_alloc_data *alloc = core_get_data(buflib_allocations[font]);
  16. +            pf = &alloc->font;
  17. +            if (pf && pf->height)
  18. +                return pf;
  19. +        }
  20.          if (--font < 0)
  21.              return &sysfont;
  22.      }
  23. -}
  24. +}    
  25.  
  26.  static int pf_to_handle(struct font* pf)
  27.  {
  28.  
  29.  
clone this paste RAW Paste Data