@@ -245,7 +245,7 @@ void Read_name(struct TTFONT *font)
245
245
{
246
246
font->Copyright = (char *)calloc (sizeof (char ),length+1 );
247
247
strncpy (font->Copyright ,(const char *)strings+offset,length);
248
- font->Copyright [length]=( char ) NULL ;
248
+ font->Copyright [length]=' \0 ' ;
249
249
replace_newlines_with_spaces (font->Copyright );
250
250
251
251
#ifdef DEBUG_TRUETYPE
@@ -261,7 +261,7 @@ void Read_name(struct TTFONT *font)
261
261
free (font->FamilyName );
262
262
font->FamilyName = (char *)calloc (sizeof (char ),length+1 );
263
263
strncpy (font->FamilyName ,(const char *)strings+offset,length);
264
- font->FamilyName [length]=( char ) NULL ;
264
+ font->FamilyName [length]=' \0 ' ;
265
265
replace_newlines_with_spaces (font->FamilyName );
266
266
267
267
#ifdef DEBUG_TRUETYPE
@@ -277,7 +277,7 @@ void Read_name(struct TTFONT *font)
277
277
free (font->Style );
278
278
font->Style = (char *)calloc (sizeof (char ),length+1 );
279
279
strncpy (font->Style ,(const char *)strings+offset,length);
280
- font->Style [length]=( char ) NULL ;
280
+ font->Style [length]=' \0 ' ;
281
281
replace_newlines_with_spaces (font->Style );
282
282
283
283
#ifdef DEBUG_TRUETYPE
@@ -293,7 +293,7 @@ void Read_name(struct TTFONT *font)
293
293
free (font->FullName );
294
294
font->FullName = (char *)calloc (sizeof (char ),length+1 );
295
295
strncpy (font->FullName ,(const char *)strings+offset,length);
296
- font->FullName [length]=( char ) NULL ;
296
+ font->FullName [length]=' \0 ' ;
297
297
replace_newlines_with_spaces (font->FullName );
298
298
299
299
#ifdef DEBUG_TRUETYPE
@@ -309,7 +309,7 @@ void Read_name(struct TTFONT *font)
309
309
free (font->Version );
310
310
font->Version = (char *)calloc (sizeof (char ),length+1 );
311
311
strncpy (font->Version ,(const char *)strings+offset,length);
312
- font->Version [length]=( char ) NULL ;
312
+ font->Version [length]=' \0 ' ;
313
313
replace_newlines_with_spaces (font->Version );
314
314
315
315
#ifdef DEBUG_TRUETYPE
@@ -325,7 +325,7 @@ void Read_name(struct TTFONT *font)
325
325
free (font->PostName );
326
326
font->PostName = (char *)calloc (sizeof (char ),length+1 );
327
327
strncpy (font->PostName ,(const char *)strings+offset,length);
328
- font->PostName [length]=( char ) NULL ;
328
+ font->PostName [length]=' \0 ' ;
329
329
replace_newlines_with_spaces (font->PostName );
330
330
331
331
#ifdef DEBUG_TRUETYPE
@@ -340,7 +340,7 @@ void Read_name(struct TTFONT *font)
340
340
free (font->PostName );
341
341
font->PostName = (char *)calloc (sizeof (char ),length+1 );
342
342
utf16be_to_ascii (font->PostName , (char *)strings+offset, length);
343
- font->PostName [length/2 ]=( char ) NULL ;
343
+ font->PostName [length/2 ]=' \0 ' ;
344
344
replace_newlines_with_spaces (font->PostName );
345
345
346
346
#ifdef DEBUG_TRUETYPE
@@ -355,7 +355,7 @@ void Read_name(struct TTFONT *font)
355
355
{
356
356
font->Trademark = (char *)calloc (sizeof (char ),length+1 );
357
357
strncpy (font->Trademark ,(const char *)strings+offset,length);
358
- font->Trademark [length]=( char ) NULL ;
358
+ font->Trademark [length]=' \0 ' ;
359
359
replace_newlines_with_spaces (font->Trademark );
360
360
361
361
#ifdef DEBUG_TRUETYPE
@@ -1041,7 +1041,7 @@ const char *ttfont_CharStrings_getname(struct TTFONT *font, int charindex)
1041
1041
}
1042
1042
1043
1043
strncpy (temp,ptr,len); /* Copy the pascal string into */
1044
- temp[len]=( char ) NULL ; /* a buffer and make it ASCIIz. */
1044
+ temp[len]=' \0 ' ; /* a buffer and make it ASCIIz. */
1045
1045
1046
1046
return temp;
1047
1047
}
0 commit comments