diff options
| author | Tim Rogers <[email protected]> | 2018-10-05 13:54:53 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-10-05 13:54:53 -0400 |
| commit | 68134d5eb326552fc1ef4b02b2eb21103266283b (patch) | |
| tree | d63ae36cdb2fcf735677f66cf8ef91d94444b925 /src/cuda-sim/ptx.l | |
| parent | cbdf8bd70cf5707dada1741d98125b60c0db7843 (diff) | |
| parent | b1fd283c064222579ee5174a980abf72e8e6ef26 (diff) | |
Merge pull request #15 from gjulianm/dev
Naive fix of OpenCL parse errors
Diffstat (limited to 'src/cuda-sim/ptx.l')
| -rw-r--r-- | src/cuda-sim/ptx.l | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cuda-sim/ptx.l b/src/cuda-sim/ptx.l index 5471d6f..af015c9 100644 --- a/src/cuda-sim/ptx.l +++ b/src/cuda-sim/ptx.l @@ -36,7 +36,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "ptx.tab.h" #include <string.h> -char linebuf[1024]; +char linebuf[4096]; unsigned col = 0; #define TC col+=strlen(ptx_text); #define CHECK_UNSIGNED \ @@ -382,7 +382,7 @@ breakaddr TC; ptx_lval.int_value = BREAKADDR_OP; return OPCODE; "//"[^\n]* TC; // eat single -\n.* col=0; strncpy(linebuf, yytext + 1, 1024); yyless( 1 ); +\n.* col=0; strncpy(linebuf, yytext + 1, sizeof(linebuf)); yyless( 1 ); " " TC; "\t" TC; |
