* Was trying to use the new system API which is not ready causing stack issues.
This commit is contained in:
		
							parent
							
								
									9ca8f42930
								
							
						
					
					
						commit
						a80248f204
					
				
					 1 changed files with 4 additions and 5 deletions
				
			
		|  | @ -107,7 +107,7 @@ INP_rdfile(fd, fn, size, pbuf) | ||||||
| 	register long *size; | 	register long *size; | ||||||
| 	char **pbuf;		/* output parameter */ | 	char **pbuf;		/* output parameter */ | ||||||
| { | { | ||||||
| 	long rsize; | 	int rsize; | ||||||
| 
 | 
 | ||||||
| 	if ( | 	if ( | ||||||
| 	     ((*size = sys_filesize(fn))) < 0 | 	     ((*size = sys_filesize(fn))) < 0 | ||||||
|  | @ -217,13 +217,12 @@ INP_rdblock(fd, buf, n) | ||||||
| 	char *buf; | 	char *buf; | ||||||
| 	int *n; | 	int *n; | ||||||
| { | { | ||||||
| 	long readSize; |  | ||||||
| 	readSize = (size_t)*n; |  | ||||||
| 
 | 
 | ||||||
| 	if (!sys_read(fd, buf, INP_BUFSIZE, &readSize)) { | 
 | ||||||
|  | 	if (!sys_read(fd, buf, INP_BUFSIZE, n)) { | ||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
| 	*n = (int)readSize; | 
 | ||||||
| 	buf[*n] = '\0'; | 	buf[*n] = '\0'; | ||||||
| 	return 1; | 	return 1; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue