diff options
author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-03-26 13:38:12 -0700 |
---|---|---|
committer | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2012-03-26 13:38:12 -0700 |
commit | 0814a04f188b5f475f46d600dc1d1de1d66ddc4a (patch) | |
tree | f8af1e2ca750e01f0dbf68070407b38fe9bf4af2 | |
parent | 93afa269f3fc18b40c0c86c920a1a0d565731dff (diff) |
Make sure that the estimated text width is an integer
-rw-r--r-- | src/library_sdl.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js index 199af7c4..ff4206a0 100644 --- a/src/library_sdl.js +++ b/src/library_sdl.js @@ -340,7 +340,7 @@ mergeInto(LibraryManager.library, { var tempCtx = SDL.surfaces[SDL.screen].ctx; tempCtx.save(); tempCtx.font = fontString; - var ret = tempCtx.measureText(text).width; + var ret = tempCtx.measureText(text).width | 0; tempCtx.restore(); return ret; }, |