[libbluray-devel] The number of bytes used by fixed-length character fields is stored as Uint8 (ECMA 1/7.2.12).

ace20022 git at videolan.org
Wed May 31 10:28:48 CEST 2017


libudfread | branch: master | ace20022 <ace20022 at ymail.com> | Tue May 30 14:00:24 2017 +0200| [df231950b8a99484bcf964aa1709aa5b13e06270] | committer: Petri Hintukainen

The number of bytes used by fixed-length character fields is stored as Uint8 (ECMA 1/7.2.12).

> http://git.videolan.org/gitweb.cgi/libudfread.git/?a=commit;h=df231950b8a99484bcf964aa1709aa5b13e06270
---

 src/ecma167.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/ecma167.c b/src/ecma167.c
index b488990..b197a1f 100644
--- a/src/ecma167.c
+++ b/src/ecma167.c
@@ -37,7 +37,7 @@
  */
 
 /* fixed-length dstring, ECMA 1/7.2.12 */
-static size_t _decode_dstring(const uint8_t *p, size_t field_length, uint8_t *str)
+static uint8_t _decode_dstring(const uint8_t *p, size_t field_length, uint8_t *str)
 {
     size_t length;
 
@@ -51,7 +51,7 @@ static size_t _decode_dstring(const uint8_t *p, size_t field_length, uint8_t *st
         length = field_length;
     }
     memcpy(str, p, length);
-    return length;
+    return (uint8_t)length;
 }
 
 /* Extent Descriptor (ECMA 167, 3/7.1) */



More information about the libbluray-devel mailing list