freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] GSoC-2017-kushal 838c65d 10/70: fixed warning


From: Kushal K S V S
Subject: [freetype2] GSoC-2017-kushal 838c65d 10/70: fixed warning
Date: Sun, 18 Mar 2018 11:21:09 -0400 (EDT)

branch: GSoC-2017-kushal
commit 838c65dce25a7539cd7762400ba2e42158ded4b1
Author: Kushal K S V S <address@hidden>
Commit: Kushal K S V S <address@hidden>

    fixed warning
---
 tests/make_png/bitmap.c   | 2 ++
 tests/make_png/make_png.c | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/make_png/bitmap.c b/tests/make_png/bitmap.c
index fdb41a7..2823850 100644
--- a/tests/make_png/bitmap.c
+++ b/tests/make_png/bitmap.c
@@ -170,6 +170,8 @@ void Make_PNG(FT_Bitmap* bitmap,char* name,int i,int 
render_mode){
                   PIXEL * pixel = Pixel_At (& fruit, x, y);
                   p = (y * bitmap->pitch ) + x;
 
+                  value = bitmap->buffer[p];
+                  
                   pixel->red = 255- value;
                   pixel->green = 255- value;
                   pixel->blue = 255- value;
diff --git a/tests/make_png/make_png.c b/tests/make_png/make_png.c
index ad57935..1698454 100644
--- a/tests/make_png/make_png.c
+++ b/tests/make_png/make_png.c
@@ -126,7 +126,7 @@ int main (int argc, char const *argv[])
                                                                                
                size,
                                                                                
                render_type);
 
-       for (i = 0; i <50; ++i)
+       for (i = 0; i <face->num_glyphs; ++i)
        {
                error = FT_Load_Glyph( face,
                            i, 
@@ -145,7 +145,7 @@ int main (int argc, char const *argv[])
 
        if (bitmap->width == 0 || bitmap->rows == 0)
     {
-       continue;
+      continue;
     }
 
     FT_Bitmap       target;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]