Files
scrcpy/app/src/util
Romain Vimont 137d2c9791 Remove confusing sc_str_truncate()
This util function was error-prone:
 - it accepted a buffer as parameter (not necessarily a NUL-terminated
   string) and its length (including the NUL char, if any);
 - it wrote '\0' over the last character of the buffer, so the last
   character was lost if the buffer was not a NUL-terminated string, and
   even worse, it caused undefined behavior if the length was empty;
 - it returned the length of the resulting NUL-terminated string,
   which was inconsistent with the input buffer length.

In addition, it was not necessarily optimal:
 - it wrote '\0' twice;
 - it required to know the buffer length, that is the input string
   length + 1, in advance.

Remove this function, and let the client use strcspn() manually.
2022-02-06 14:39:51 +01:00
..
2021-11-23 21:15:05 +01:00
2021-01-24 15:31:21 +01:00
2021-01-17 14:08:48 +01:00
2021-11-24 22:06:49 +01:00
2021-11-12 22:44:37 +01:00
2021-11-24 22:06:49 +01:00
2022-01-28 09:15:18 +01:00
2022-01-28 09:15:18 +01:00
2021-11-13 22:54:18 +01:00
2022-01-28 09:15:18 +01:00
2021-11-21 22:37:37 +01:00
2021-12-09 21:32:11 +01:00
2022-01-29 08:05:59 +01:00
2021-07-14 00:35:10 +02:00
2022-02-06 14:39:51 +01:00
2022-02-06 14:39:51 +01:00
2021-11-24 22:06:49 +01:00
2021-11-11 14:55:52 +01:00
2021-11-11 15:22:39 +01:00
2021-11-11 15:22:39 +01:00
2021-12-09 21:32:11 +01:00
2021-12-08 23:45:45 +01:00
2021-12-08 23:45:45 +01:00