diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-01-03 17:14:28 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-01-03 17:14:28 -0300 |
commit | e8fbf39f886b2b5dbf5e14f07cd1dbefe8d48bf4 (patch) | |
tree | f767c7db6b089cdc6d4c56cce09a2c65fa68e274 /core/ustring.cpp | |
parent | b988f016fd2ae1fc6fab4daa1eb580e1446dbd8d (diff) | |
download | redot-engine-e8fbf39f886b2b5dbf5e14f07cd1dbefe8d48bf4.tar.gz |
-Replaced tinyjpg for jpgd (public domain), fixes progressive encoded jpgs and speeds up. Closes #2040
-Removed support of loading BitMap as image, now it must be load as a pnm, also closes #2040
Diffstat (limited to 'core/ustring.cpp')
-rw-r--r-- | core/ustring.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index c93fb80ca8..21c0d78fdb 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -1636,12 +1636,16 @@ int64_t String::to_int64() const { return integer*sign; } -int String::to_int(const char* p_str) { +int String::to_int(const char* p_str,int p_len) { int to=0; - while(p_str[to]!=0 && p_str[to]!='.') - to++; + if (p_len>=0) + to=p_len; + else { + while(p_str[to]!=0 && p_str[to]!='.') + to++; + } int integer=0; |