pveselov

Android system patch

May 9th, 2017
501
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.72 KB | None | 0 0
  1. diff --git a/android/android-emu/android/base/system/System.cpp b/android/android-emu/android/base/system/System.cpp
  2. index 53b1085..c6f08e7 100755
  3. --- a/android/android-emu/android/base/system/System.cpp
  4. +++ b/android/android-emu/android/base/system/System.cpp
  5. @@ -643,9 +643,9 @@ public:
  6.  #elif defined (__linux__)
  7.          size_t size = 0;
  8.          FILE *fp = fopen("/proc/self/status", "r");
  9. -        char buf[256];
  10. +        char buf[1024];
  11.          if (fp != NULL) {
  12. -            while (fscanf(fp, "%s:", buf) > 0)  {
  13. +            while (fscanf(fp, "%256s:", buf) > 0)  {
  14.                  if (strcmp(buf, "VmRSS:") == 0) {
  15.                      fscanf(fp, "%lu", &size);
  16.                      res.resident = size * 1024;
Advertisement
Add Comment
Please, Sign In to add comment