Explorar el Código

Fixed offset check in GenImageFontAtlas (#1171)

* Fixed offset check in GenImageFontAtlas

* Fixed code formatting to follow raylib notation rules
SasLuca hace 5 años
padre
commit
8444c3f705
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/text.c

+ 1 - 1
src/text.c

@@ -652,7 +652,7 @@ Image GenImageFontAtlas(const CharInfo *chars, Rectangle **charRecs, int charsCo
             // Move atlas position X for next character drawing
             offsetX += (chars[i].image.width + 2*padding);
 
-            if (offsetX >= (atlas.width - chars[i].image.width - padding))
+            if (offsetX >= (atlas.width - chars[i].image.width - 2*padding))
             {
                 offsetX = padding;